Merge branch 'master' of https://git.dayouqiantu.cn/yshopb2c/yshop into master

This commit is contained in:
LIONCITYS\lioncity
2020-09-22 10:16:29 +08:00
10 changed files with 20 additions and 9 deletions

View File

@ -8,7 +8,7 @@ spring:
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://localhost:3306/yshopb2c?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull
username: root
password:
password: xxcs@!2019
# 初始化配置
initial-size: 3

View File

@ -138,7 +138,7 @@ public class StoreProductController {
@ApiImplicitParam(name = "id", value = "商品ID", paramType = "query", dataType = "int")
})
@ApiOperation(value = "商品详情海报",notes = "商品详情海报")
public ApiResult<String> prodoctPoster(@PathVariable Integer id,@RequestParam String from) throws IOException, FontFormatException {
public ApiResult<String> prodoctPoster(@PathVariable Integer id,@RequestParam(value = "from",defaultValue = "h5") String from) throws IOException, FontFormatException {
YxUser userInfo = LocalUser.getUser();
long uid = userInfo.getUid();

View File

@ -187,8 +187,7 @@ public class CreatShareProductService {
}
}
else{//其他
if(!from.equals(AppFromEnum.ROUNTINE.getValue())) {
}
if(StrUtil.isBlank(from)) from = AppFromEnum.H5.getValue();
String name = uid + "_"+from+"_user_wap.jpg";

View File

@ -91,11 +91,12 @@ public class WechatController {
*/
@GetMapping("/wechat/config")
@ApiOperation(value = "jssdk配置",notes = "jssdk配置")
public ApiResult<Map<String,Object>> jsConfig(@RequestParam(value = "url") String url) throws WxErrorException {
public ApiResult<Map<String,Object>> jsConfig(HttpServletRequest request) throws WxErrorException {
WxMpService wxService = WxMpConfiguration.getWxMpService();
String url = request.getParameter("url");
log.info("url:"+url);
WxJsapiSignature jsapiSignature = wxService.createJsapiSignature(url);
Map<String,Object> map = new LinkedHashMap<>();
map.put("appId",jsapiSignature.getAppId());
map.put("jsApiList",new String[]{"updateAppMessageShareData","openLocation","scanQRCode",
"chooseWXPay","updateAppMessageShareData","updateTimelineShareData",

View File

@ -7,7 +7,7 @@ spring:
master:
url: jdbc:mysql://localhost:3306/yshopb2c?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password:
password: xxcs@!2019
# 从库数据源
slave:
# 从数据源开关/默认关闭

View File

@ -168,7 +168,7 @@ public class RedisUtils {
}
public String getY(String key){
return key == null ? "" : redisTemplate.opsForValue().get(key).toString();
return key == null || !redisTemplate.hasKey(key) ? "" : redisTemplate.opsForValue().get(key).toString();
}
/**

View File

@ -254,7 +254,7 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
yxStoreSeckill.setStock(resultDTO.getStock());
yxStoreSeckill.setOtPrice(BigDecimal.valueOf(resultDTO.getMinOtPrice()));
yxStoreSeckill.setPostage(BigDecimal.valueOf(resultDTO.getMinPrice()));
yxStoreSeckill.setPrice(BigDecimal.valueOf(resultDTO.getMinPrice()));
yxStoreSeckill.setCost(BigDecimal.valueOf(resultDTO.getMinCost()));
yxStoreSeckill.setStock(resultDTO.getStock());
yxStoreSeckill.setImages(String.join(",", resources.getImages()));

View File

@ -9,6 +9,7 @@
package co.yixiang.modules.shop.rest;
import java.util.Arrays;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.modules.aop.ForbidSubmit;
import lombok.AllArgsConstructor;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.product.domain.YxStoreProductRelation;
@ -72,6 +73,7 @@ public class YxStoreProductRelationController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@ForbidSubmit
@Log("删除ProductRelation")
@ApiOperation("删除ProductRelation")
@PreAuthorize("@el.check('admin','yxStoreProductRelation:del')")

View File

@ -10,6 +10,7 @@ package co.yixiang.modules.wechat.rest;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.mp.domain.YxWechatLive;
import co.yixiang.modules.mp.service.YxWechatLiveService;
import co.yixiang.modules.mp.service.dto.UpdateGoodsDto;
@ -65,6 +66,7 @@ public class YxWechatLiveController {
return new ResponseEntity<>(yxWechatLiveService.queryAll(criteria,pageable),HttpStatus.OK);
}
@ForbidSubmit
@PostMapping
@Log("新增wxlive")
@ApiOperation("新增wxlive")
@ -74,6 +76,7 @@ public class YxWechatLiveController {
}
@ForbidSubmit
@PostMapping("/addGoods")
@Log("添加商品")
@ApiOperation("添加商品")
@ -82,6 +85,7 @@ public class YxWechatLiveController {
return new ResponseEntity<>(yxWechatLiveService.addGoods(resources),HttpStatus.CREATED);
}
@ForbidSubmit
@PutMapping
@Log("修改wxlive")
@ApiOperation("修改wxlive")
@ -91,6 +95,7 @@ public class YxWechatLiveController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@ForbidSubmit
@Log("删除wxlive")
@ApiOperation("删除wxlive")
@PreAuthorize("@el.check('admin','yxWechatLive:del')")

View File

@ -10,6 +10,7 @@ package co.yixiang.modules.wechat.rest;
import co.yixiang.dozer.service.IGenerator;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.mp.domain.YxWechatLiveGoods;
import co.yixiang.modules.mp.service.YxWechatLiveGoodsService;
import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsDto;
@ -63,6 +64,7 @@ public class YxWechatLiveGoodsController {
return new ResponseEntity<>(yxWechatLiveGoodsService.queryAll(criteria,pageable),HttpStatus.OK);
}
@ForbidSubmit
@PostMapping
@Log("新增yxWechatLiveGoods")
@ApiOperation("新增yxWechatLiveGoods")
@ -71,6 +73,7 @@ public class YxWechatLiveGoodsController {
return new ResponseEntity<>(yxWechatLiveGoodsService.saveGoods(resources),HttpStatus.CREATED);
}
@ForbidSubmit
@PutMapping
@Log("修改yxWechatLiveGoods")
@ApiOperation("修改yxWechatLiveGoods")
@ -80,6 +83,7 @@ public class YxWechatLiveGoodsController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@ForbidSubmit
@Log("删除yxWechatLiveGoods")
@ApiOperation("删除yxWechatLiveGoods")
@PreAuthorize("@el.check('admin','yxWechatLiveGoods:del')")