Merge branch 'feature/mall_product_new'
commit
f4751d6057
|
@ -74,7 +74,7 @@ public class ShippingTemplatesController {
|
|||
@Operation(summary = "删除")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.GET)
|
||||
@Parameter(name="id", description="模板ID", required = true)
|
||||
public CommonResult<String> delete(@RequestParam(value = "id") Integer id){
|
||||
public CommonResult<String> delete(@RequestParam(value = "id") Long id){
|
||||
if(shippingTemplatesService.remove(id)){
|
||||
return success("删除成功");
|
||||
}else{
|
||||
|
@ -90,7 +90,7 @@ public class ShippingTemplatesController {
|
|||
@PreAuthorize("@ss.hasPermission('admin:shipping:templates:update')")
|
||||
@Operation(summary = "修改")
|
||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||
public CommonResult<String> update(@RequestParam Integer id, @RequestBody @Validated ShippingTemplatesReqVO request){
|
||||
public CommonResult<String> update(@RequestParam Long id, @RequestBody @Validated ShippingTemplatesReqVO request){
|
||||
if (shippingTemplatesService.update(id, request)) {
|
||||
return CommonResult.success("修改成功");
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public class ShippingTemplatesController {
|
|||
@Operation(summary = "详情")
|
||||
@RequestMapping(value = "/info", method = RequestMethod.GET)
|
||||
@Parameter(name="id", description="模板ID", required = true)
|
||||
public CommonResult<ShippingTemplatesDO> info(@RequestParam(value = "id") Integer id){
|
||||
public CommonResult<ShippingTemplatesDO> info(@RequestParam(value = "id") Long id){
|
||||
return CommonResult.success(shippingTemplatesService.getInfo(id));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ShippingTemplatesFreeController {
|
|||
@PreAuthorize("@ss.hasPermission('admin:shipping:templates:free:list')")
|
||||
@Operation(summary = "根据模板id查询数据")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult<List<ShippingTemplatesFreeRespVO>> getList(@RequestParam Integer tempId){
|
||||
public CommonResult<List<ShippingTemplatesFreeRespVO>> getList(@RequestParam Long tempId){
|
||||
return CommonResult.success(shippingTemplatesFreeService.getListGroup(tempId));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ShippingTemplatesNoDeliveryController {
|
|||
@PreAuthorize("@ss.hasPermission('admin:shipping:templates:free:list')")
|
||||
@Operation(summary = "根据模板id查询数据")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult<List<ShippingTemplatesNoDeliveryRespVO>> getList(@RequestParam Integer tempId){
|
||||
public CommonResult<List<ShippingTemplatesNoDeliveryRespVO>> getList(@RequestParam Long tempId){
|
||||
return CommonResult.success(shippingTemplatesNoDeliveryService.getListGroup(tempId));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ShippingTemplatesRegionController {
|
|||
@PreAuthorize("@ss.hasPermission('admin:shipping:templates:region:list')")
|
||||
@Operation(summary = "根据模板id查询数据")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult<List<ShippingTemplatesRegionRespVO>> getList(@RequestParam Integer tempId){
|
||||
public CommonResult<List<ShippingTemplatesRegionRespVO>> getList(@RequestParam Long tempId){
|
||||
return CommonResult.success(shippingTemplatesRegionService.getListGroup(tempId));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class ShippingTemplatesDO extends BaseDO {
|
|||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*模板名称
|
||||
|
|
|
@ -31,12 +31,12 @@ public class ShippingTemplatesFreeDO implements Serializable {
|
|||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private Integer tempId;
|
||||
private Long tempId;
|
||||
|
||||
|
||||
private Integer provinceId;
|
||||
|
|
|
@ -30,12 +30,12 @@ public class ShippingTemplatesNoDeliveryDO implements Serializable {
|
|||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private Integer tempId;
|
||||
private Long tempId;
|
||||
|
||||
/**
|
||||
*城市ID
|
||||
|
|
|
@ -31,12 +31,12 @@ public class ShippingTemplatesRegionDO implements Serializable {
|
|||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private Integer tempId;
|
||||
private Long tempId;
|
||||
|
||||
/**
|
||||
*城市ID
|
||||
|
|
|
@ -22,5 +22,5 @@ import java.util.List;
|
|||
@Mapper
|
||||
public interface ShippingTemplatesFreeMapper extends BaseMapperX<ShippingTemplatesFreeDO> {
|
||||
|
||||
List<ShippingTemplatesFreeRespVO> getListGroup(Integer tempId);
|
||||
List<ShippingTemplatesFreeRespVO> getListGroup(Long tempId);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,6 @@ import java.util.List;
|
|||
@Mapper
|
||||
public interface ShippingTemplatesNoDeliveryMapper extends BaseMapperX<ShippingTemplatesNoDeliveryDO> {
|
||||
|
||||
List<ShippingTemplatesNoDeliveryRespVO> getList(Integer tempId);
|
||||
List<ShippingTemplatesNoDeliveryRespVO> getList(Long tempId);
|
||||
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ import java.util.List;
|
|||
@Mapper
|
||||
public interface ShippingTemplatesRegionMapper extends BaseMapperX<ShippingTemplatesRegionDO> {
|
||||
|
||||
List<ShippingTemplatesRegionRespVO> getListGroup(Integer tempId);
|
||||
List<ShippingTemplatesRegionRespVO> getListGroup(Long tempId);
|
||||
}
|
||||
|
|
|
@ -24,15 +24,15 @@ import java.util.List;
|
|||
@Validated
|
||||
public interface ShippingTemplatesFreeService extends IService<ShippingTemplatesFreeDO> {
|
||||
|
||||
void saveAll(List<ShippingTemplatesFreeRespVO> shippingTemplatesFreeRespVOList, Integer type, Integer id);
|
||||
void saveAll(List<ShippingTemplatesFreeRespVO> shippingTemplatesFreeRespVOList, Integer type, Long id);
|
||||
|
||||
List<ShippingTemplatesFreeRespVO> getListGroup(Integer tempId);
|
||||
List<ShippingTemplatesFreeRespVO> getListGroup(Long tempId);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param tempId 运费模板id
|
||||
*/
|
||||
Boolean delete(Integer tempId);
|
||||
Boolean delete(Long tempId);
|
||||
|
||||
/**
|
||||
* 根据模板编号、城市ID查询
|
||||
|
@ -40,5 +40,5 @@ public interface ShippingTemplatesFreeService extends IService<ShippingTemplates
|
|||
* @param cityId 城市ID
|
||||
* @return 运费模板
|
||||
*/
|
||||
ShippingTemplatesFreeDO getByTempIdAndCityId(Integer tempId, Integer cityId);
|
||||
ShippingTemplatesFreeDO getByTempIdAndCityId(Long tempId, Integer cityId);
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@ import java.util.List;
|
|||
@Validated
|
||||
public interface ShippingTemplatesNoDeliveryService extends IService<ShippingTemplatesNoDeliveryDO> {
|
||||
|
||||
void saveAll(ShippingTemplatesNoDeliveryRespVO shippingTemplatesFreeRespVOList, Integer id);
|
||||
void saveAll(ShippingTemplatesNoDeliveryRespVO shippingTemplatesFreeRespVOList, Long id);
|
||||
|
||||
List<ShippingTemplatesNoDeliveryRespVO> getListGroup(Integer tempId);
|
||||
List<ShippingTemplatesNoDeliveryRespVO> getListGroup(Long tempId);
|
||||
|
||||
/**
|
||||
* 根据模板编号、城市ID查询
|
||||
|
@ -35,7 +35,7 @@ public interface ShippingTemplatesNoDeliveryService extends IService<ShippingTem
|
|||
* @param cityId 城市ID
|
||||
* @return 运费模板
|
||||
*/
|
||||
ShippingTemplatesNoDeliveryDO getByTempIdAndCityId(Integer tempId, Integer cityId);
|
||||
ShippingTemplatesNoDeliveryDO getByTempIdAndCityId(Long tempId, Integer cityId);
|
||||
|
||||
public Boolean delete(Integer tempId);
|
||||
public Boolean delete(Long tempId);
|
||||
}
|
||||
|
|
|
@ -25,16 +25,16 @@ import java.util.List;
|
|||
@Validated
|
||||
public interface ShippingTemplatesRegionService extends IService<ShippingTemplatesRegionDO> {
|
||||
|
||||
void saveAll(List<ShippingTemplatesRegionRespVO> shippingTemplatesRegionRespVOList, Integer type, Integer id);
|
||||
void saveAll(List<ShippingTemplatesRegionRespVO> shippingTemplatesRegionRespVOList, Integer type, Long id);
|
||||
|
||||
List<ShippingTemplatesRegionRespVO> getListGroup(Integer tempId);
|
||||
List<ShippingTemplatesRegionRespVO> getListGroup(Long tempId);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param tempId 运费模板id
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean delete(Integer tempId);
|
||||
Boolean delete(Long tempId);
|
||||
|
||||
/**
|
||||
* 根据模板编号、城市ID查询
|
||||
|
@ -42,5 +42,5 @@ public interface ShippingTemplatesRegionService extends IService<ShippingTemplat
|
|||
* @param cityId 城市ID
|
||||
* @return 运费模板
|
||||
*/
|
||||
ShippingTemplatesRegionDO getByTempIdAndCityId(Integer tempId, Integer cityId);
|
||||
ShippingTemplatesRegionDO getByTempIdAndCityId(Long tempId, Integer cityId);
|
||||
}
|
||||
|
|
|
@ -35,19 +35,19 @@ public interface ShippingTemplatesService extends IService<ShippingTemplatesDO>
|
|||
*/
|
||||
Boolean create(ShippingTemplatesReqVO request);
|
||||
|
||||
Boolean update(Integer id, ShippingTemplatesReqVO request);
|
||||
Boolean update(Long id, ShippingTemplatesReqVO request);
|
||||
|
||||
/**
|
||||
* 删除模板
|
||||
* @param id 模板id
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean remove(Integer id);
|
||||
Boolean remove(Long id);
|
||||
|
||||
/**
|
||||
* 获取模板信息
|
||||
* @param id 模板id
|
||||
* @return ShippingTemplates
|
||||
*/
|
||||
ShippingTemplatesDO getInfo(Integer id);
|
||||
ShippingTemplatesDO getInfo(Long id);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesFreeService
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -48,9 +47,8 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl<ShippingTempla
|
|||
* @author Mr.Zhang
|
||||
* @since 2020-05-20
|
||||
*/
|
||||
@Async
|
||||
@Override
|
||||
public void saveAll(List<ShippingTemplatesFreeRespVO> shippingTemplatesFreeRespVOList, Integer type, Integer tempId) {
|
||||
public void saveAll(List<ShippingTemplatesFreeRespVO> shippingTemplatesFreeRespVOList, Integer type, Long tempId) {
|
||||
|
||||
ArrayList<ShippingTemplatesFreeDO> shippingTemplatesFreesListDO = new ArrayList<>();
|
||||
|
||||
|
@ -82,6 +80,7 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl<ShippingTempla
|
|||
|
||||
//删除模板下的无效数据
|
||||
deleteStatusFalse(tempId);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -105,7 +104,7 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl<ShippingTempla
|
|||
* @author Mr.Zhang
|
||||
* @since 2020-05-20
|
||||
*/
|
||||
private void updateStatus(Integer tempId) {
|
||||
private void updateStatus(Long tempId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesFreeDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesFreeDO::getTempId, tempId);
|
||||
|
||||
|
@ -119,7 +118,7 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl<ShippingTempla
|
|||
* @param tempId Integer 运费模板id
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Integer tempId) {
|
||||
public Boolean delete(Long tempId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesFreeDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesFreeDO::getTempId, tempId);
|
||||
return dao.delete(lambdaQueryWrapper) > 0;
|
||||
|
@ -129,7 +128,7 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl<ShippingTempla
|
|||
* 删除模板下的无效数据
|
||||
* @param tempId Integer 运费模板id
|
||||
*/
|
||||
public Boolean deleteStatusFalse(Integer tempId) {
|
||||
public Boolean deleteStatusFalse(Long tempId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesFreeDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesFreeDO::getTempId, tempId);
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesFreeDO::getStatus, false);
|
||||
|
@ -143,7 +142,7 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl<ShippingTempla
|
|||
* @return 运费模板
|
||||
*/
|
||||
@Override
|
||||
public ShippingTemplatesFreeDO getByTempIdAndCityId(Integer tempId, Integer cityId) {
|
||||
public ShippingTemplatesFreeDO getByTempIdAndCityId(Long tempId, Integer cityId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesFreeDO> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.eq(ShippingTemplatesFreeDO::getTempId, tempId);
|
||||
lqw.eq(ShippingTemplatesFreeDO::getCityId, cityId);
|
||||
|
@ -159,7 +158,7 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl<ShippingTempla
|
|||
* @return List<ShippingTemplatesFreeRequest>
|
||||
*/
|
||||
@Override
|
||||
public List<ShippingTemplatesFreeRespVO> getListGroup(Integer tempId) {
|
||||
public List<ShippingTemplatesFreeRespVO> getListGroup(Long tempId) {
|
||||
return dao.getListGroup(tempId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ShippingTemplatesNoDeliveryServiceImpl extends ServiceImpl<Shipping
|
|||
* @since 2020-05-20
|
||||
*/
|
||||
@Override
|
||||
public void saveAll(ShippingTemplatesNoDeliveryRespVO shippingTemplatesNoDeliveryRespVOS, Integer tempId) {
|
||||
public void saveAll(ShippingTemplatesNoDeliveryRespVO shippingTemplatesNoDeliveryRespVOS, Long tempId) {
|
||||
ArrayList<ShippingTemplatesNoDeliveryDO> shippingTemplatesNoDeliveryDOS = new ArrayList<>();
|
||||
|
||||
delete(tempId);
|
||||
|
@ -64,7 +64,7 @@ public class ShippingTemplatesNoDeliveryServiceImpl extends ServiceImpl<Shipping
|
|||
* @param tempId Integer 运费模板id
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Integer tempId) {
|
||||
public Boolean delete(Long tempId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesNoDeliveryDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesNoDeliveryDO::getTempId, tempId);
|
||||
return shippingTemplatesNoDeliveryMapper.delete(lambdaQueryWrapper) > 0;
|
||||
|
@ -92,7 +92,7 @@ public class ShippingTemplatesNoDeliveryServiceImpl extends ServiceImpl<Shipping
|
|||
* @return List<ShippingTemplatesFreeRequest>
|
||||
*/
|
||||
@Override
|
||||
public List<ShippingTemplatesNoDeliveryRespVO> getListGroup(Integer tempId) {
|
||||
public List<ShippingTemplatesNoDeliveryRespVO> getListGroup(Long tempId) {
|
||||
return shippingTemplatesNoDeliveryMapper.getList(tempId);
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class ShippingTemplatesNoDeliveryServiceImpl extends ServiceImpl<Shipping
|
|||
* @return 运费模板
|
||||
*/
|
||||
@Override
|
||||
public ShippingTemplatesNoDeliveryDO getByTempIdAndCityId(Integer tempId, Integer cityId) {
|
||||
public ShippingTemplatesNoDeliveryDO getByTempIdAndCityId(Long tempId, Integer cityId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesNoDeliveryDO> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.eq(ShippingTemplatesNoDeliveryDO::getTempId, tempId);
|
||||
lqw.eq(ShippingTemplatesNoDeliveryDO::getCityId, cityId);
|
||||
|
|
|
@ -59,9 +59,8 @@ public class ShippingTemplatesRegionServiceImpl extends ServiceImpl<ShippingTemp
|
|||
* @author Mr.Zhang
|
||||
* @since 2020-05-20
|
||||
*/
|
||||
@Async
|
||||
@Override
|
||||
public void saveAll(List<ShippingTemplatesRegionRespVO> shippingTemplatesRegionRespVOList, Integer type, Integer tempId) {
|
||||
public void saveAll(List<ShippingTemplatesRegionRespVO> shippingTemplatesRegionRespVOList, Integer type, Long tempId) {
|
||||
ArrayList<ShippingTemplatesRegionDO> shippingTemplatesRegionDOList = new ArrayList<>();
|
||||
|
||||
//把目前模板下的所有数据标记为无效
|
||||
|
@ -95,6 +94,7 @@ public class ShippingTemplatesRegionServiceImpl extends ServiceImpl<ShippingTemp
|
|||
|
||||
//删除模板下的无效数据
|
||||
deleteStatusFalse(tempId);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -120,7 +120,7 @@ public class ShippingTemplatesRegionServiceImpl extends ServiceImpl<ShippingTemp
|
|||
* @author Mr.Zhang
|
||||
* @since 2020-05-20
|
||||
*/
|
||||
private void updateStatus(Integer tempId) {
|
||||
private void updateStatus(Long tempId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesRegionDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesRegionDO::getTempId, tempId);
|
||||
|
||||
|
@ -134,7 +134,7 @@ public class ShippingTemplatesRegionServiceImpl extends ServiceImpl<ShippingTemp
|
|||
* @param tempId Integer 运费模板id
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean deleteStatusFalse(Integer tempId) {
|
||||
public Boolean deleteStatusFalse(Long tempId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesRegionDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesRegionDO::getTempId, tempId);
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesRegionDO::getStatus, false);
|
||||
|
@ -148,7 +148,7 @@ public class ShippingTemplatesRegionServiceImpl extends ServiceImpl<ShippingTemp
|
|||
* @return 运费模板
|
||||
*/
|
||||
@Override
|
||||
public ShippingTemplatesRegionDO getByTempIdAndCityId(Integer tempId, Integer cityId) {
|
||||
public ShippingTemplatesRegionDO getByTempIdAndCityId(Long tempId, Integer cityId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesRegionDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesRegionDO::getTempId, tempId);
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesRegionDO::getCityId, cityId);
|
||||
|
@ -163,12 +163,12 @@ public class ShippingTemplatesRegionServiceImpl extends ServiceImpl<ShippingTemp
|
|||
* @return List<ShippingTemplatesRegionRequest>
|
||||
*/
|
||||
@Override
|
||||
public List<ShippingTemplatesRegionRespVO> getListGroup(Integer tempId) {
|
||||
public List<ShippingTemplatesRegionRespVO> getListGroup(Long tempId) {
|
||||
return dao.getListGroup(tempId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean delete(Integer tempId) {
|
||||
public Boolean delete(Long tempId) {
|
||||
LambdaQueryWrapper<ShippingTemplatesRegionDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ShippingTemplatesRegionDO::getTempId, tempId);
|
||||
return dao.delete(lambdaQueryWrapper) > 0;
|
||||
|
|
|
@ -146,7 +146,7 @@ public class ShippingTemplatesServiceImpl extends ServiceImpl<ShippingTemplatesM
|
|||
* @param request ShippingTemplatesRequest 新增参数
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(Integer id, ShippingTemplatesReqVO request) {
|
||||
public Boolean update(Long id, ShippingTemplatesReqVO request) {
|
||||
ShippingTemplatesDO shippingTemplatesDO = new ShippingTemplatesDO();
|
||||
shippingTemplatesDO.setId(id);
|
||||
shippingTemplatesDO.setName(request.getName());
|
||||
|
@ -184,7 +184,7 @@ public class ShippingTemplatesServiceImpl extends ServiceImpl<ShippingTemplatesM
|
|||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean remove(Integer id) {
|
||||
public Boolean remove(Long id) {
|
||||
return transactionTemplate.execute(e -> {
|
||||
shippingTemplatesRegionService.delete(id);
|
||||
shippingTemplatesFreeService.delete(id);
|
||||
|
@ -200,7 +200,7 @@ public class ShippingTemplatesServiceImpl extends ServiceImpl<ShippingTemplatesM
|
|||
* @return ShippingTemplates
|
||||
*/
|
||||
@Override
|
||||
public ShippingTemplatesDO getInfo(Integer id) {
|
||||
public ShippingTemplatesDO getInfo(Long id) {
|
||||
ShippingTemplatesDO template = getById(id);
|
||||
if (ObjectUtil.isNull(template)) {
|
||||
throw new ServiceException("模板不存在");
|
||||
|
|
|
@ -4,19 +4,19 @@ import cn.hutool.core.collection.CollUtil;
|
|||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||
import cn.iocoder.yudao.module.member.api.address.AddressApi;
|
||||
import cn.iocoder.yudao.module.member.api.address.UserAddressApi;
|
||||
import cn.iocoder.yudao.module.member.api.address.dto.AddressRespDTO;
|
||||
import cn.iocoder.yudao.module.member.api.address.dto.UserAddressRespDTO;
|
||||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||
import cn.iocoder.yudao.module.shop.constants.PayConstants;
|
||||
import cn.iocoder.yudao.framework.common.enums.Constants;
|
||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.framework.common.pojo.DateLimitUtilVo;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||
import cn.iocoder.yudao.module.infra.api.config.ApiConfigApi;
|
||||
import cn.iocoder.yudao.module.member.api.address.AddressApi;
|
||||
import cn.iocoder.yudao.module.member.api.address.UserAddressApi;
|
||||
import cn.iocoder.yudao.module.member.api.address.dto.UserAddressRespDTO;
|
||||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||
import cn.iocoder.yudao.module.shop.constants.PayConstants;
|
||||
import cn.iocoder.yudao.module.shop.constants.SysConfigConstants;
|
||||
import cn.iocoder.yudao.module.shop.convert.order.StoreOrderConvert;
|
||||
import cn.iocoder.yudao.module.shop.convert.order.StoreOrderOneConvert;
|
||||
|
@ -28,7 +28,6 @@ import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrder;
|
|||
import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrderInfo;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.product.StoreProduct;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.product.StoreProductAttrValue;
|
||||
import cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesMapper;
|
||||
import cn.iocoder.yudao.module.shop.dal.mysql.order.StoreOrderMapper;
|
||||
import cn.iocoder.yudao.module.shop.request.order.*;
|
||||
import cn.iocoder.yudao.module.shop.request.product.StoreProductReplyAddRequest;
|
||||
|
@ -47,7 +46,10 @@ import cn.iocoder.yudao.module.shop.service.product.StoreProductService;
|
|||
import cn.iocoder.yudao.module.shop.utils.CrmebUtil;
|
||||
import cn.iocoder.yudao.module.shop.utils.OrderUtil;
|
||||
import cn.iocoder.yudao.module.shop.utils.RedisUtil;
|
||||
import cn.iocoder.yudao.module.shop.vo.order.*;
|
||||
import cn.iocoder.yudao.module.shop.vo.order.OrderInfoDetailVo;
|
||||
import cn.iocoder.yudao.module.shop.vo.order.OrderInfoVo;
|
||||
import cn.iocoder.yudao.module.shop.vo.order.StoreOrderInfoOldVo;
|
||||
import cn.iocoder.yudao.module.shop.vo.order.StoreOrderInfoVo;
|
||||
import cn.iocoder.yudao.module.shop.vo.product.MyRecord;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
@ -62,7 +64,6 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -692,7 +693,7 @@ public class OrderServiceImpl implements OrderService {
|
|||
|
||||
for (Map.Entry<Integer, MyRecord> m : proMap.entrySet()) {
|
||||
MyRecord value = m.getValue();
|
||||
Integer tempId = value.getInt("tempId");
|
||||
Long tempId = value.getLong("tempId");
|
||||
ShippingTemplatesDO shippingTemplatesDO = shippingTemplatesApi.getById(tempId);
|
||||
if (shippingTemplatesDO.getAppoint()) {// 指定包邮
|
||||
// 判断是否在指定包邮区域内
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesFreeMapper">
|
||||
|
||||
<select id="getListGroup" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesFreeRespVO" parameterType="integer">
|
||||
<select id="getListGroup" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesFreeRespVO" parameterType="Long">
|
||||
SELECT
|
||||
city_id, province_id, title, `number`, price, uniqid
|
||||
FROM
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesNoDeliveryMapper">
|
||||
|
||||
<select id="getList" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO" parameterType="integer">
|
||||
<select id="getList" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO" parameterType="Long">
|
||||
SELECT
|
||||
city_id, province_id, title, uniqid
|
||||
FROM
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesRegionMapper">
|
||||
|
||||
<select id="getListGroup" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesRegionRespVO" parameterType="integer">
|
||||
<select id="getListGroup" resultType="cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesRegionRespVO" parameterType="Long">
|
||||
SELECT
|
||||
city_id, province_id, `first`, first_price, title, `renewal`, renewal_price, uniqid
|
||||
FROM
|
||||
|
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
||||
import cn.iocoder.yudao.module.member.enums.ErrorCodeConstants;
|
||||
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
||||
|
@ -71,11 +72,11 @@ public class PromoterServiceImpl implements PromoterService {
|
|||
memberUserDO.setMobile(createReqVO.getMobile());
|
||||
memberUserDO.setStatus(createReqVO.getStatus());
|
||||
memberUserDO.setPassword(createReqVO.getMobile().substring(createReqVO.getMobile().length() - 6));
|
||||
memberUserService.createUserIfAbsent(createReqVO.getMobile(), createReqVO.getNickname(), getClientIP());
|
||||
memberUserDO = memberUserService.createUserIfAbsent(createReqVO.getMobile(), createReqVO.getNickname(), getClientIP());
|
||||
}
|
||||
// 插入
|
||||
PromoterDO promoter = PromoterConvert.INSTANCE.convert(createReqVO);
|
||||
promoter.setTenantId(SecurityFrameworkUtils.getLoginUser().getTenantId());
|
||||
promoter.setTenantId(TenantContextHolder.getTenantId());
|
||||
Long count = promoterMapper.selectCount(Wrappers.lambdaQuery(PromoterDO.class).eq(PromoterDO::getUserId, memberUserDO.getId()));
|
||||
if (count > 0) {
|
||||
throw new ServiceException(PROMOTER_EXISTS);
|
||||
|
|
|
@ -240,5 +240,5 @@ wx:
|
|||
database: 16 # 数据库索引
|
||||
password: 20221122@dev # 密码,建议生产环境开启
|
||||
phone:
|
||||
query-url: http://cy-phone-bill-inquiry-server:4006/cyywl-phone-query-api/
|
||||
query-url: http://192.168.1.94:4006/cyywl-phone-query-api/
|
||||
token: eyIwLnR5cCI6IkpXVCIsImFsZyI6IkhTNTEyIn0
|
|
@ -20,8 +20,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="mask" @click='close' v-if="pay_close"></view>
|
||||
<button style="cursor: pointer;display:none;" class="clipboard"
|
||||
:data-clipboard-text="alipayLink">
|
||||
<button style="cursor: pointer;display:none;" class="clipboard" :data-clipboard-text="alipayLink">
|
||||
</button>
|
||||
<!-- 支付宝支付界面 -->
|
||||
<u-modal :show="alipayShow" title="支付宝支付" @confirm="handleConfirm">
|
||||
|
@ -38,6 +37,7 @@
|
|||
wechatOrderPay,
|
||||
wechatQueryPayResult
|
||||
} from '@/api/order.js';
|
||||
import uniPay from '@/libs/pay.js'
|
||||
import {
|
||||
memberTopUp
|
||||
} from '@/api/member.js';
|
||||
|
@ -82,126 +82,32 @@
|
|||
this.alipayShow = false
|
||||
window.location.reload()
|
||||
},
|
||||
// 复制操作
|
||||
_copy(context) {
|
||||
// 创建输入框元素
|
||||
let oInput = document.createElement('input');
|
||||
// 将想要复制的值
|
||||
oInput.value = context;
|
||||
// 页面底部追加输入框
|
||||
document.body.appendChild(oInput);
|
||||
// 选中输入框
|
||||
oInput.select();
|
||||
// 执行浏览器复制命令
|
||||
document.execCommand('Copy');
|
||||
// 弹出复制成功信息
|
||||
this.$util.Tips({
|
||||
title: '复制链接成功'
|
||||
})
|
||||
this.alipayShow = true
|
||||
// 复制后移除输入框
|
||||
oInput.remove();
|
||||
},
|
||||
close: function() {
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
},
|
||||
// 微信支付JSAPI调起
|
||||
wxPayJSAPI(payData) {
|
||||
function onBridgeReady() {
|
||||
WeixinJSBridge.invoke('getBrandWCPayRequest', {
|
||||
"appId": payData.appId, //公众号ID,由商户传入
|
||||
"timeStamp": payData.timeStamp, //时间戳,自1970年以来的秒数
|
||||
"nonceStr": payData.nonceStr, //随机串
|
||||
"package": payData.packageValue,
|
||||
"signType": payData.signType, //微信签名方式:
|
||||
"paySign": payData.paySign //微信签名
|
||||
},
|
||||
function(res) {
|
||||
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
||||
window.location.reload()
|
||||
// uni.switchTab({
|
||||
// url: '/pages/member_application/index'
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
if (typeof WeixinJSBridge == "undefined") {
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)
|
||||
} else if (document.attachEvent) {
|
||||
document.attachEvent('WeixinJSBridgeReady', onBridgeReady)
|
||||
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady)
|
||||
}
|
||||
} else {
|
||||
onBridgeReady()
|
||||
}
|
||||
},
|
||||
|
||||
goPay: function(paytype) {
|
||||
let that = this;
|
||||
if (that.payInfo.orderInfos.length === 0) return that.$util.Tips({
|
||||
title: '请选择要支付的订单'
|
||||
});
|
||||
uni.showLoading({
|
||||
title: '支付中',
|
||||
mask: true
|
||||
});
|
||||
if(paytype === 'WXPAY' && that.openId) {
|
||||
that.payInfo.openid = that.openId
|
||||
|
||||
} else if(paytype === 'WXPAY' && !that.openId){
|
||||
return that.$util.Tips({
|
||||
title: '请在微信客户端进行支付操作'
|
||||
});
|
||||
}
|
||||
memberTopUp({
|
||||
...that.payInfo,
|
||||
payType: paytype
|
||||
}).then(res => {
|
||||
let jsConfig = res.data
|
||||
switch (paytype) {
|
||||
case 'WXPAY':
|
||||
uni.hideLoading();
|
||||
that.wxPayJSAPI(jsConfig.jsapiResult)
|
||||
break;
|
||||
case 'ALIPAY':
|
||||
uni.hideLoading();
|
||||
this.alipayLink = jsConfig.body
|
||||
// this._copy(jsConfig.body)
|
||||
setTimeout(()=>{
|
||||
document.querySelector(".clipboard").click();
|
||||
this.alipayShow = true
|
||||
}, 500)
|
||||
// const div = document.createElement('div')
|
||||
// /* 下面的data.content就是后台返回接收到的数据 */
|
||||
// div.innerHTML = jsConfig.body
|
||||
// document.body.appendChild(div)
|
||||
// document.forms[0].submit()
|
||||
break;
|
||||
case 'weixinh5':
|
||||
uni.hideLoading();
|
||||
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol +
|
||||
'//' + window.location.host + goPages + '&status=1');
|
||||
return that.$util.Tips({
|
||||
title: "支付中",
|
||||
icon: 'success'
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_complete'
|
||||
});
|
||||
});
|
||||
break;
|
||||
uniPay({
|
||||
payInfo: that.payInfo,
|
||||
payType: paytype,
|
||||
createOrderFun: memberTopUp,
|
||||
wxPaySuccess: () => {
|
||||
window.location.reload()
|
||||
},
|
||||
aliPaySuccess: (link) => {
|
||||
that.alipayLink = link
|
||||
setTimeout(() => {
|
||||
document.querySelector(".clipboard").click();
|
||||
that.alipayShow = true
|
||||
}, 500)
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
}, () => {
|
||||
that.$emit('onChangeFun', {
|
||||
action: 'pay_fail'
|
||||
});
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
import util from 'utils/util'
|
||||
import store from '@/store'
|
||||
|
||||
const payTypes = ['WXPAY', 'ALIPAY']
|
||||
/**
|
||||
* 统一支付处理方法
|
||||
* @param payInfo // 支付下单信息
|
||||
* @param payType // 支付类型
|
||||
* @param createOrderFun // 预下单方法
|
||||
* @param wxPaySuccess // 微信支付下单支付成功回调
|
||||
* @param aliPaySuccess // 支付宝支付下单成功回调
|
||||
*/
|
||||
const unityPay = (options) => {
|
||||
let _options = {
|
||||
payInfo: {},
|
||||
payType: '',
|
||||
createOrderFun: () => {},
|
||||
wxPaySuccess: () => {},
|
||||
aliPaySuccess: () => {}
|
||||
}
|
||||
Object.assign(_options, options)
|
||||
if (!_options.payType) {
|
||||
return util.Tips({
|
||||
title: '请选择支付方式'
|
||||
})
|
||||
}
|
||||
if (!payTypes.includes(_options.payType)) {
|
||||
throw new Error('支付方式参数值为 WXPAY、ALIPAY')
|
||||
}
|
||||
// 目前微信只支持JSAPI,h5支付开通后取消该验证
|
||||
const openId = store.state.app.openId || ''
|
||||
if (_options.payType === 'WXPAY' && !openId) {
|
||||
return util.Tips({
|
||||
title: '请在微信客户端进行支付操作'
|
||||
})
|
||||
}
|
||||
_options.payInfo.openid = openId
|
||||
uni.showLoading({
|
||||
title: '支付中',
|
||||
mask: true
|
||||
})
|
||||
_options.createOrderFun({
|
||||
..._options.payInfo,
|
||||
payType: _options.payType
|
||||
}).then(res => {
|
||||
const payConfig = res.data
|
||||
switch (_options.payType) {
|
||||
// 微信JSAPI支付
|
||||
case 'WXPAY':
|
||||
wxPayJSAPI(payConfig.jsapiResult)
|
||||
break
|
||||
case 'ALIPAY':
|
||||
_options.aliPaySuccess(payConfig.body)
|
||||
break
|
||||
}
|
||||
}).catch(() => {
|
||||
util.Tips({
|
||||
title: '预下单失败'
|
||||
})
|
||||
}).finally(uni.hideLoading)
|
||||
}
|
||||
|
||||
const wxPayJSAPI = (payData) => {
|
||||
function onBridgeReady() {
|
||||
WeixinJSBridge.invoke('getBrandWCPayRequest', {
|
||||
"appId": payData.appId, //公众号ID,由商户传入
|
||||
"timeStamp": payData.timeStamp, //时间戳,自1970年以来的秒数
|
||||
"nonceStr": payData.nonceStr, //随机串
|
||||
"package": payData.packageValue,
|
||||
"signType": payData.signType, //微信签名方式:
|
||||
"paySign": payData.paySign //微信签名
|
||||
},
|
||||
function(res) {
|
||||
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
||||
_options.wxPaySuccess()
|
||||
}
|
||||
})
|
||||
}
|
||||
if (typeof WeixinJSBridge == "undefined") {
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)
|
||||
} else if (document.attachEvent) {
|
||||
document.attachEvent('WeixinJSBridgeReady', onBridgeReady)
|
||||
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady)
|
||||
}
|
||||
} else {
|
||||
onBridgeReady()
|
||||
}
|
||||
}
|
||||
|
||||
export default unityPay
|
Binary file not shown.
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 2.2 KiB |
Loading…
Reference in New Issue