Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -51,6 +51,7 @@ public class TbProskuConController {
|
||||
} catch (BadRequestException be) {
|
||||
throw new Exception(be.getMessage());
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
throw new Exception("相同商品耗材信息不允许添加");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,8 @@ public class TbProskuConServiceImpl implements TbProskuConService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public TbProskuConDto create(List<ProskuInfo> resources) throws BadRequestException,Exception {
|
||||
|
||||
log.info("List<ProskuInfo> resources:{}",JSONUtil.toJSONString(resources));
|
||||
for (ProskuInfo resource : resources) {
|
||||
TbProduct product= tbProductRepository.getById(resource.getProductId());
|
||||
if(Objects.isNull(product)){
|
||||
|
||||
@@ -96,11 +96,11 @@ public class StorageController {
|
||||
}
|
||||
private InputStream fetchQRCode(Map<String, Object> params) {
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("path", "pages/member/index");//路径
|
||||
jsonObject.addProperty("path", "pages/member/index?shopId="+params.get("shopId"));//路径
|
||||
jsonObject.addProperty("is_hyaline", true);//是否需要透明底色,为 true 时,生成透明底色的小程序码
|
||||
if (params.containsKey("env_version")) jsonObject.addProperty("env_version", "trial");//正式版为 release,体验版为 trial,开发版为 develop
|
||||
String accessToken = getAccessToken();
|
||||
String url = String.format("%s?access_token=%s&shopId=%s", QR_CODE_URL, accessToken,params.get("shopId"));
|
||||
String url = String.format("%s?access_token=%s", QR_CODE_URL, accessToken);
|
||||
return HttpUtil.createPost(url)
|
||||
.body(jsonObject.toString(), "application/json")
|
||||
.execute()
|
||||
|
||||
@@ -230,11 +230,11 @@ public class TbShopUserServiceImpl implements TbShopUserService {
|
||||
|
||||
if("in".equals(operationType)){
|
||||
flow.setType("+");
|
||||
flow.setBizName("inMoney".equals(type)?"充值退款":"消费退款");
|
||||
flow.setBizName("inMoney".equals(type)?"充值":"消费退款");
|
||||
flow.setBizCode("inMoney".equals(type)?"inMoneyIn":"consumeIn");
|
||||
tbShopUser.setAmount(tbShopUser.getAmount().add(amount));
|
||||
}else if("out".equals(operationType)){
|
||||
flow.setBizName("inMoney".equals(type)?"充值退款扣除":"消费扣除");
|
||||
flow.setBizName("inMoney".equals(type)?"充值退款":"消费");
|
||||
flow.setBizCode("inMoney".equals(type)?"inMoneyOut":"consumeOut");
|
||||
flow.setType("-");
|
||||
tbShopUser.setAmount(tbShopUser.getAmount().subtract(amount));
|
||||
|
||||
Reference in New Issue
Block a user