Merge branch 'master' of https://git.dayouqiantu.cn/yshopb2c/yshop into master
This commit is contained in:
@ -8,7 +8,7 @@ spring:
|
|||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
url: jdbc:log4jdbc:mysql://localhost:3306/yshopb2c?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull
|
url: jdbc:log4jdbc:mysql://localhost:3306/yshopb2c?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull
|
||||||
username: root
|
username: root
|
||||||
password:
|
password: xxcs@!2019
|
||||||
|
|
||||||
# 初始化配置
|
# 初始化配置
|
||||||
initial-size: 3
|
initial-size: 3
|
||||||
|
@ -138,7 +138,7 @@ public class StoreProductController {
|
|||||||
@ApiImplicitParam(name = "id", value = "商品ID", paramType = "query", dataType = "int")
|
@ApiImplicitParam(name = "id", value = "商品ID", paramType = "query", dataType = "int")
|
||||||
})
|
})
|
||||||
@ApiOperation(value = "商品详情海报",notes = "商品详情海报")
|
@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();
|
YxUser userInfo = LocalUser.getUser();
|
||||||
|
|
||||||
long uid = userInfo.getUid();
|
long uid = userInfo.getUid();
|
||||||
|
@ -187,8 +187,7 @@ public class CreatShareProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{//其他
|
else{//其他
|
||||||
if(!from.equals(AppFromEnum.ROUNTINE.getValue())) {
|
if(StrUtil.isBlank(from)) from = AppFromEnum.H5.getValue();
|
||||||
}
|
|
||||||
|
|
||||||
String name = uid + "_"+from+"_user_wap.jpg";
|
String name = uid + "_"+from+"_user_wap.jpg";
|
||||||
|
|
||||||
|
@ -91,11 +91,12 @@ public class WechatController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/wechat/config")
|
@GetMapping("/wechat/config")
|
||||||
@ApiOperation(value = "jssdk配置",notes = "jssdk配置")
|
@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();
|
WxMpService wxService = WxMpConfiguration.getWxMpService();
|
||||||
|
String url = request.getParameter("url");
|
||||||
|
log.info("url:"+url);
|
||||||
WxJsapiSignature jsapiSignature = wxService.createJsapiSignature(url);
|
WxJsapiSignature jsapiSignature = wxService.createJsapiSignature(url);
|
||||||
Map<String,Object> map = new LinkedHashMap<>();
|
Map<String,Object> map = new LinkedHashMap<>();
|
||||||
|
|
||||||
map.put("appId",jsapiSignature.getAppId());
|
map.put("appId",jsapiSignature.getAppId());
|
||||||
map.put("jsApiList",new String[]{"updateAppMessageShareData","openLocation","scanQRCode",
|
map.put("jsApiList",new String[]{"updateAppMessageShareData","openLocation","scanQRCode",
|
||||||
"chooseWXPay","updateAppMessageShareData","updateTimelineShareData",
|
"chooseWXPay","updateAppMessageShareData","updateTimelineShareData",
|
||||||
|
@ -7,7 +7,7 @@ spring:
|
|||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/yshopb2c?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/yshopb2c?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password:
|
password: xxcs@!2019
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
@ -168,7 +168,7 @@ public class RedisUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getY(String key){
|
public String getY(String key){
|
||||||
return key == null ? "" : redisTemplate.opsForValue().get(key).toString();
|
return key == null || !redisTemplate.hasKey(key) ? "" : redisTemplate.opsForValue().get(key).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -254,7 +254,7 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
|
|||||||
|
|
||||||
yxStoreSeckill.setStock(resultDTO.getStock());
|
yxStoreSeckill.setStock(resultDTO.getStock());
|
||||||
yxStoreSeckill.setOtPrice(BigDecimal.valueOf(resultDTO.getMinOtPrice()));
|
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.setCost(BigDecimal.valueOf(resultDTO.getMinCost()));
|
||||||
yxStoreSeckill.setStock(resultDTO.getStock());
|
yxStoreSeckill.setStock(resultDTO.getStock());
|
||||||
yxStoreSeckill.setImages(String.join(",", resources.getImages()));
|
yxStoreSeckill.setImages(String.join(",", resources.getImages()));
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
package co.yixiang.modules.shop.rest;
|
package co.yixiang.modules.shop.rest;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import co.yixiang.dozer.service.IGenerator;
|
import co.yixiang.dozer.service.IGenerator;
|
||||||
|
import co.yixiang.modules.aop.ForbidSubmit;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import co.yixiang.logging.aop.log.Log;
|
import co.yixiang.logging.aop.log.Log;
|
||||||
import co.yixiang.modules.product.domain.YxStoreProductRelation;
|
import co.yixiang.modules.product.domain.YxStoreProductRelation;
|
||||||
@ -72,6 +73,7 @@ public class YxStoreProductRelationController {
|
|||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ForbidSubmit
|
||||||
@Log("删除ProductRelation")
|
@Log("删除ProductRelation")
|
||||||
@ApiOperation("删除ProductRelation")
|
@ApiOperation("删除ProductRelation")
|
||||||
@PreAuthorize("@el.check('admin','yxStoreProductRelation:del')")
|
@PreAuthorize("@el.check('admin','yxStoreProductRelation:del')")
|
||||||
|
@ -10,6 +10,7 @@ package co.yixiang.modules.wechat.rest;
|
|||||||
|
|
||||||
import co.yixiang.dozer.service.IGenerator;
|
import co.yixiang.dozer.service.IGenerator;
|
||||||
import co.yixiang.logging.aop.log.Log;
|
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.domain.YxWechatLive;
|
||||||
import co.yixiang.modules.mp.service.YxWechatLiveService;
|
import co.yixiang.modules.mp.service.YxWechatLiveService;
|
||||||
import co.yixiang.modules.mp.service.dto.UpdateGoodsDto;
|
import co.yixiang.modules.mp.service.dto.UpdateGoodsDto;
|
||||||
@ -65,6 +66,7 @@ public class YxWechatLiveController {
|
|||||||
return new ResponseEntity<>(yxWechatLiveService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(yxWechatLiveService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ForbidSubmit
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Log("新增wxlive")
|
@Log("新增wxlive")
|
||||||
@ApiOperation("新增wxlive")
|
@ApiOperation("新增wxlive")
|
||||||
@ -74,6 +76,7 @@ public class YxWechatLiveController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ForbidSubmit
|
||||||
@PostMapping("/addGoods")
|
@PostMapping("/addGoods")
|
||||||
@Log("添加商品")
|
@Log("添加商品")
|
||||||
@ApiOperation("添加商品")
|
@ApiOperation("添加商品")
|
||||||
@ -82,6 +85,7 @@ public class YxWechatLiveController {
|
|||||||
return new ResponseEntity<>(yxWechatLiveService.addGoods(resources),HttpStatus.CREATED);
|
return new ResponseEntity<>(yxWechatLiveService.addGoods(resources),HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ForbidSubmit
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Log("修改wxlive")
|
@Log("修改wxlive")
|
||||||
@ApiOperation("修改wxlive")
|
@ApiOperation("修改wxlive")
|
||||||
@ -91,6 +95,7 @@ public class YxWechatLiveController {
|
|||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ForbidSubmit
|
||||||
@Log("删除wxlive")
|
@Log("删除wxlive")
|
||||||
@ApiOperation("删除wxlive")
|
@ApiOperation("删除wxlive")
|
||||||
@PreAuthorize("@el.check('admin','yxWechatLive:del')")
|
@PreAuthorize("@el.check('admin','yxWechatLive:del')")
|
||||||
|
@ -10,6 +10,7 @@ package co.yixiang.modules.wechat.rest;
|
|||||||
|
|
||||||
import co.yixiang.dozer.service.IGenerator;
|
import co.yixiang.dozer.service.IGenerator;
|
||||||
import co.yixiang.logging.aop.log.Log;
|
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.domain.YxWechatLiveGoods;
|
||||||
import co.yixiang.modules.mp.service.YxWechatLiveGoodsService;
|
import co.yixiang.modules.mp.service.YxWechatLiveGoodsService;
|
||||||
import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsDto;
|
import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsDto;
|
||||||
@ -63,6 +64,7 @@ public class YxWechatLiveGoodsController {
|
|||||||
return new ResponseEntity<>(yxWechatLiveGoodsService.queryAll(criteria,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(yxWechatLiveGoodsService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ForbidSubmit
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Log("新增yxWechatLiveGoods")
|
@Log("新增yxWechatLiveGoods")
|
||||||
@ApiOperation("新增yxWechatLiveGoods")
|
@ApiOperation("新增yxWechatLiveGoods")
|
||||||
@ -71,6 +73,7 @@ public class YxWechatLiveGoodsController {
|
|||||||
return new ResponseEntity<>(yxWechatLiveGoodsService.saveGoods(resources),HttpStatus.CREATED);
|
return new ResponseEntity<>(yxWechatLiveGoodsService.saveGoods(resources),HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ForbidSubmit
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Log("修改yxWechatLiveGoods")
|
@Log("修改yxWechatLiveGoods")
|
||||||
@ApiOperation("修改yxWechatLiveGoods")
|
@ApiOperation("修改yxWechatLiveGoods")
|
||||||
@ -80,6 +83,7 @@ public class YxWechatLiveGoodsController {
|
|||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ForbidSubmit
|
||||||
@Log("删除yxWechatLiveGoods")
|
@Log("删除yxWechatLiveGoods")
|
||||||
@ApiOperation("删除yxWechatLiveGoods")
|
@ApiOperation("删除yxWechatLiveGoods")
|
||||||
@PreAuthorize("@el.check('admin','yxWechatLiveGoods:del')")
|
@PreAuthorize("@el.check('admin','yxWechatLiveGoods:del')")
|
||||||
|
Reference in New Issue
Block a user