Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
44ebc15119
13 files changed
+87
-11
No files matched your search
+2
@@ -14,4 +14,6 @@ public class HardCarDto extends HardCarEntity {
|
||||
|
||||
private LocalDate[] createTimeList;
|
||||
|
||||
private String hourType;
|
||||
|
||||
}
|
||||
+3
@@ -17,4 +17,7 @@ public class HardCanteenProductTotalVo {
|
||||
@Schema(description = "食品总数量")
|
||||
private Long payCount;
|
||||
|
||||
@Schema(description = "食品总价格")
|
||||
private Long totalPrice;
|
||||
|
||||
}
|
||||
+21
-3
@@ -50,7 +50,10 @@
|
||||
</sql>
|
||||
|
||||
<select id="productTotal" resultType="com.bsd.pjcloud.hard.api.vo.order.HardCanteenProductTotalVo">
|
||||
select DATE_FORMAT(a.create_time, '%Y-%m-%d') as createTime, o.hour_type, COUNT(a.product_count) as payCount
|
||||
select DATE_FORMAT(a.create_time, '%Y-%m-%d') as createTime,
|
||||
o.hour_type,
|
||||
COUNT(a.product_count) as payCount,
|
||||
SUM(a.total_price) as totalPrice
|
||||
from hard_car a
|
||||
inner join hard_parent_car p on a.parent_car_id = p.id and p.del_flag = '0'
|
||||
inner join hard_order o on o.parent_car_id = p.id and o.del_flag = '0' and o.hour_type is not null
|
||||
@@ -110,12 +113,27 @@
|
||||
</if>
|
||||
</where>
|
||||
group by DATE_FORMAT(a.create_time, '%Y-%m-%d'), o.hour_type
|
||||
order by DATE_FORMAT(a.create_time, '%Y-%m-%d') desc, o.hour_type;
|
||||
order by DATE_FORMAT(a.create_time, '%Y-%m-%d') desc, o.hour_type desc;
|
||||
</select>
|
||||
|
||||
<select id="proudctQuery" resultType="com.bsd.pjcloud.hard.api.vo.order.HardCarVo">
|
||||
select a.product_id,
|
||||
a.product_name,
|
||||
a.product_pic,
|
||||
a.product_price,
|
||||
SUM(a.product_count) as count,
|
||||
SUM(a.product_price) as totalPrice,
|
||||
DATE_FORMAT(a.create_time, '%Y-%m-%d') as create_time
|
||||
from hard_car a
|
||||
inner join hard_parent_car p on a.parent_car_id = p.id and p.del_flag = '0'
|
||||
inner join hard_order o on o.parent_car_id = p.id and o.del_flag = '0' and o.hour_type is not null
|
||||
<where>
|
||||
<include refid="whereA" />
|
||||
<include refid="whereA"/>
|
||||
<if test="dto.hourType != null and dto.hourType != '' ">
|
||||
and o.hour_type = #{dto.hourType}
|
||||
</if>
|
||||
</where>
|
||||
group by a.product_id
|
||||
order by SUM(a.product_count) desc
|
||||
</select>
|
||||
</mapper>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.bsd.pjcloud.thirdparty.api.feign;
|
||||
|
||||
import com.bsd.pjcloud.common.core.constant.ServiceNameConstants;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.feign.annotation.NoToken;
|
||||
import com.bsd.pjcloud.thirdparty.dto.lb.LbH5LoginDto;
|
||||
import com.bsd.pjcloud.thirdparty.vo.lb.LbH5LoginVo;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(contextId = "remoterThirdLbApiService", value = ServiceNameConstants.THIRDPARTY_SERVICE)
|
||||
public interface RemoterThirdLbApiService {
|
||||
|
||||
@NoToken
|
||||
@PostMapping("/third-lb/h5-login")
|
||||
R<LbH5LoginVo> h5Login(@RequestBody LbH5LoginDto dto);
|
||||
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ public class LbH5LoginVo {
|
||||
|
||||
private String msg;
|
||||
|
||||
private String h5Url;
|
||||
private String data;
|
||||
|
||||
public boolean isSuccess() {
|
||||
return code == 200;
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdKsService
|
||||
com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdDoorApiService
|
||||
com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdLbApiService
|
||||
com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdPartyAuthService
|
||||
com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdZyService
|
||||
+3
-2
@@ -4,6 +4,7 @@ import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.thirdparty.dto.lb.LbH5LoginDto;
|
||||
import com.bsd.pjcloud.thirdparty.service.ThirdLbApiService;
|
||||
import com.bsd.pjcloud.thirdparty.vo.lb.LbH5LoginVo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -21,10 +22,10 @@ public class ThirdLbApiController {
|
||||
|
||||
private final ThirdLbApiService thirdLbApiService;
|
||||
|
||||
@Inner(value = false)
|
||||
@Inner()
|
||||
@Operation(summary = "美好生活登录", description = "美好生活登录")
|
||||
@PostMapping("/h5-login")
|
||||
public R H5Login(@Valid @RequestBody LbH5LoginDto dto) {
|
||||
public R<LbH5LoginVo> h5Login(@Valid @RequestBody LbH5LoginDto dto) {
|
||||
return R.ok(thirdLbApiService.h5Login(dto));
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -39,8 +39,7 @@ public class ThirdLbApiServiceImpl implements ThirdLbApiService {
|
||||
long timeMillis = System.currentTimeMillis() / 1000;
|
||||
String signature = apiCountersign(dto.getPhone(), timeMillis);
|
||||
Map<String, String> queryMap = new HashMap<>();
|
||||
// queryMap.put("companyNumber", lbConfig.getCompanyNumber());
|
||||
queryMap.put("appId", lbConfig.getAppId());
|
||||
queryMap.put("appKey", lbConfig.getAppId());
|
||||
queryMap.put("phone", signPhone);
|
||||
queryMap.put("timestamp", String.valueOf(timeMillis));
|
||||
queryMap.put("signature", signature);
|
||||
|
||||
+2
-2
@@ -92,9 +92,9 @@ lb:
|
||||
base-url: https://elss-sit.nbcb.com.cn
|
||||
# base-url: https://elss-sit.nbcb.com.cn/h5/thirdApp
|
||||
app-id: 7da62b1a9ade473c917f573c5748081e
|
||||
app-secret: 8ffl6b+OKTmdVAt9Qo+2F/HQQMdt/d8GFia0zUOt9l=
|
||||
app-secret: 8ffI6b+OKTmdVAt9Qo+2F/HQQMdt/d8GFia0zlJOt9I=
|
||||
company-number: 202504673472
|
||||
sm4-key: 567157e8aQs2tF5X
|
||||
sm4-key: S67157e8aQs2tFSX
|
||||
|
||||
|
||||
sms:
|
||||
|
||||
+2
-1
@@ -29,7 +29,7 @@ import java.util.Map;
|
||||
@SpringBootTest(classes = ThirdPartyApp.class)
|
||||
public class PayTest {
|
||||
|
||||
private final String baseUrl = "127.0.0.1:9999";
|
||||
private final String baseUrl = "http://123.156.230.15:8089/api";
|
||||
|
||||
private final String walletInfoUrl = "/third/third-pay-api/user-wallet";
|
||||
|
||||
@@ -53,6 +53,7 @@ public class PayTest {
|
||||
LbH5LoginDto dto = new LbH5LoginDto();
|
||||
dto.setPhone("17683843144");
|
||||
LbH5LoginVo loginVo = thirdLbApiService.h5Login(dto);
|
||||
log.info(loginVo.toString());
|
||||
}
|
||||
|
||||
// 查询钱包信息
|
||||
|
||||
+9
@@ -12,6 +12,8 @@ import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.common.security.service.PjcloudUser;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.wallet.api.dto.MchManageDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.mch.MchManageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.MchManageVo;
|
||||
@@ -127,6 +129,13 @@ public class MchManageController {
|
||||
public R<MchManageVo> appPageJoin(@RequestParam Long id) {
|
||||
return R.ok(mchManageService.join(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "宁波银行登录", description = "宁波银行登录")
|
||||
@GetMapping("/app/lb-login")
|
||||
public R<String> lbLogin() {
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
return R.ok(mchManageService.lbLogin(user));
|
||||
}
|
||||
/* ************************************* end app end ************************************* */
|
||||
|
||||
@Operation(summary = "刷新商户二维码", description = "刷新商户二维码")
|
||||
|
||||
+6
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.common.core.constant.enums.MerchantTypeEnum;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.security.service.PjcloudUser;
|
||||
import com.bsd.pjcloud.wallet.api.dto.MchManageDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.mch.MchManageEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.MchManageVo;
|
||||
@@ -44,4 +45,9 @@ public interface MchManageService extends IService<MchManageEntity> {
|
||||
* 刷新商户二维码
|
||||
*/
|
||||
void refreshQrcode(Long mchId);
|
||||
|
||||
/**
|
||||
* 宁波银行登录
|
||||
*/
|
||||
String lbLogin(PjcloudUser user);
|
||||
}
|
||||
+17
@@ -20,8 +20,12 @@ import com.bsd.pjcloud.common.core.util.CollectionUtils;
|
||||
import com.bsd.pjcloud.common.core.util.QRCodeImageGenerator;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.security.service.PjcloudUser;
|
||||
import com.bsd.pjcloud.hard.api.feign.RemoteHardOrderService;
|
||||
import com.bsd.pjcloud.hard.api.utils.Drawing2D;
|
||||
import com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdLbApiService;
|
||||
import com.bsd.pjcloud.thirdparty.dto.lb.LbH5LoginDto;
|
||||
import com.bsd.pjcloud.thirdparty.vo.lb.LbH5LoginVo;
|
||||
import com.bsd.pjcloud.wallet.api.constant.mch.WalletMchSupType;
|
||||
import com.bsd.pjcloud.wallet.api.dto.MchManageDto;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletTypeDto;
|
||||
@@ -69,6 +73,7 @@ public class MchManageServiceImpl extends ServiceImpl<MchManageMapper, MchManage
|
||||
private final RemoteDeptService remoteDeptService;
|
||||
private final RemoteFileService remoteFileService;
|
||||
private final RemoteHardOrderService remoteHardOrderService;
|
||||
private final RemoterThirdLbApiService remoterThirdLbApiService;
|
||||
|
||||
@Lazy
|
||||
private final WalletThirdZyService walletThirdZyService;
|
||||
@@ -314,6 +319,18 @@ public class MchManageServiceImpl extends ServiceImpl<MchManageMapper, MchManage
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 宁波银行登录
|
||||
*/
|
||||
@Override
|
||||
public String lbLogin(PjcloudUser user) {
|
||||
LbH5LoginDto dto = new LbH5LoginDto();
|
||||
dto.setPhone(user.getPhone());
|
||||
LbH5LoginVo vo = remoterThirdLbApiService.h5Login(dto).getData();
|
||||
if (ObjectUtil.isEmpty(vo)) return null;
|
||||
return vo.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新分店数量
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user