提交
This commit is contained in:
parent
5580d056b3
commit
741f62554a
@ -136,19 +136,6 @@ public class UserController {
|
|||||||
return CommonResult.failed();
|
return CommonResult.failed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param id String id
|
|
||||||
*/
|
|
||||||
@PreAuthorize("hasAuthority('admin:user:update')")
|
|
||||||
@ApiOperation(value = "批量设置核销员")
|
|
||||||
@RequestMapping(value = "/batchSetProsecutor", method = RequestMethod.POST)
|
|
||||||
public CommonResult<String> batchSetProsecutor(@RequestParam String id) {
|
|
||||||
if (userService.batchSetProsecutor(id)) {
|
|
||||||
return CommonResult.success();
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员分组
|
* 会员分组
|
||||||
* @param id String id
|
* @param id String id
|
||||||
|
@ -149,7 +149,4 @@ public class User implements Serializable {
|
|||||||
@ApiModelProperty(value = "成为分销员时间")
|
@ApiModelProperty(value = "成为分销员时间")
|
||||||
private Date promoterTime;
|
private Date promoterTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否核销员,0否,1是")
|
|
||||||
private Integer isProsecutor;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@ -71,6 +70,4 @@ public class UserSearchRequest implements Serializable {
|
|||||||
@ApiModelProperty(value = "性别,0未知,1男,2女,3保密")
|
@ApiModelProperty(value = "性别,0未知,1男,2女,3保密")
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否核销员:0否,1是", allowableValues = "range[0,1]")
|
|
||||||
private String isProsecutor;
|
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,4 @@ public class UserUpdateRequest implements Serializable {
|
|||||||
@NotNull(message = "是否为推广员不能为空")
|
@NotNull(message = "是否为推广员不能为空")
|
||||||
private Boolean isPromoter;
|
private Boolean isPromoter;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否核销员,0否,1是")
|
|
||||||
private Integer isProsecutor;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,4 @@ public class UserCenterResponse implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "用户收藏数量")
|
@ApiModelProperty(value = "用户收藏数量")
|
||||||
private Integer collectCount;
|
private Integer collectCount;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否核销员,0否,1是")
|
|
||||||
private Integer isProsecutor;
|
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,4 @@ public class UserResponse {
|
|||||||
@ApiModelProperty(value = "是否关注公众号")
|
@ApiModelProperty(value = "是否关注公众号")
|
||||||
private Boolean subscribe;
|
private Boolean subscribe;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否核销员,0否,1是")
|
|
||||||
private Integer isProsecutor;
|
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public class CouponController {
|
|||||||
* 根据购物车id获取可用优惠券
|
* 根据购物车id获取可用优惠券
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "当前订单可用优惠券")
|
@ApiOperation(value = "当前订单可用优惠券")
|
||||||
@RequestMapping(value = "coupons/order/{preOrderNo}", method = RequestMethod.GET)
|
@RequestMapping(value = "/coupons/order/{preOrderNo}", method = RequestMethod.GET)
|
||||||
public CommonResult<List<StoreCouponUserOrder>> getCouponsListByPreOrderNo(@PathVariable String preOrderNo) {
|
public CommonResult<List<StoreCouponUserOrder>> getCouponsListByPreOrderNo(@PathVariable String preOrderNo) {
|
||||||
return CommonResult.success(storeCouponUserService.getListByPreOrderNo(preOrderNo));
|
return CommonResult.success(storeCouponUserService.getListByPreOrderNo(preOrderNo));
|
||||||
}
|
}
|
||||||
|
@ -39,11 +39,4 @@ public interface StoreOrderVerification {
|
|||||||
*/
|
*/
|
||||||
StoreOrderVerificationConfirmResponse getVerificationOrderByCode(String vCode);
|
StoreOrderVerificationConfirmResponse getVerificationOrderByCode(String vCode);
|
||||||
|
|
||||||
/**
|
|
||||||
* 核销员核销码核销订单
|
|
||||||
* @param vCode
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
boolean prosecutorVerificationOrderByCode(String vCode);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -316,6 +316,4 @@ public interface UserService extends IService<User> {
|
|||||||
*/
|
*/
|
||||||
User getInfoByUid(Integer id);
|
User getInfoByUid(Integer id);
|
||||||
|
|
||||||
boolean batchSetProsecutor(String id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,6 @@ public class StoreCouponUserServiceImpl extends ServiceImpl<StoreCouponUserDao,
|
|||||||
lambdaQueryWrapper.eq(StoreCouponUser::getUid, userService.getUserIdException());
|
lambdaQueryWrapper.eq(StoreCouponUser::getUid, userService.getUserIdException());
|
||||||
getPrimaryKeySql(lambdaQueryWrapper, StringUtils.join(productIds, ","));
|
getPrimaryKeySql(lambdaQueryWrapper, StringUtils.join(productIds, ","));
|
||||||
|
|
||||||
|
|
||||||
ArrayList<StoreCouponUserOrder> storeCouponUserOrderArrayList = new ArrayList<>();
|
ArrayList<StoreCouponUserOrder> storeCouponUserOrderArrayList = new ArrayList<>();
|
||||||
List<StoreCouponUser> storeCouponUserList = dao.selectList(lambdaQueryWrapper);
|
List<StoreCouponUser> storeCouponUserList = dao.selectList(lambdaQueryWrapper);
|
||||||
if (storeCouponUserList.size() < 1) {
|
if (storeCouponUserList.size() < 1) {
|
||||||
|
@ -18,7 +18,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -189,20 +189,6 @@ public class StoreOrderVerificationImpl implements StoreOrderVerification {
|
|||||||
return verificationOrderByCode(vCode, currentAdmin.getId(), 0);
|
return verificationOrderByCode(vCode, currentAdmin.getId(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 核销员核销订单
|
|
||||||
* @param vCode
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean prosecutorVerificationOrderByCode(String vCode) {
|
|
||||||
User currentUser = userService.getInfo();
|
|
||||||
if (null == currentUser || currentUser.getIsProsecutor() == 0) {
|
|
||||||
throw new CrmebException("您不是核销员,无法核销订单");
|
|
||||||
}
|
|
||||||
return verificationOrderByCode(vCode, currentUser.getUid(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据核销码查询待核销订单
|
* 根据核销码查询待核销订单
|
||||||
*
|
*
|
||||||
|
@ -217,13 +217,9 @@ public class SystemGroupDataServiceImpl extends ServiceImpl<SystemGroupDataDao,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public HashMap<String, Object> getMenuUser() {
|
public HashMap<String, Object> getMenuUser() {
|
||||||
User user = userService.getInfo();
|
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
List<HashMap<String, Object>> routine_my_menus = getListMapByGid(SysGroupDataConstants.GROUP_DATA_ID_USER_CENTER_MENU);
|
List<HashMap<String, Object>> routine_my_menus = getListMapByGid(SysGroupDataConstants.GROUP_DATA_ID_USER_CENTER_MENU);
|
||||||
List<HashMap<String, Object>> routine_my_banner = getListMapByGid(SysGroupDataConstants.GROUP_DATA_ID_USER_CENTER_BANNER);
|
List<HashMap<String, Object>> routine_my_banner = getListMapByGid(SysGroupDataConstants.GROUP_DATA_ID_USER_CENTER_BANNER);
|
||||||
if (null == user || user.getIsProsecutor() == 0) {
|
|
||||||
routine_my_menus = routine_my_menus.stream().filter(i-> !i.get("name").equals("核销订单")).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
map.put("routine_my_menus", routine_my_menus);
|
map.put("routine_my_menus", routine_my_menus);
|
||||||
map.put("routine_my_banner", routine_my_banner);
|
map.put("routine_my_banner", routine_my_banner);
|
||||||
return map;
|
return map;
|
||||||
|
@ -150,10 +150,6 @@ public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserS
|
|||||||
map.put("sex", Integer.valueOf(request.getSex()));
|
map.put("sex", Integer.valueOf(request.getSex()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(request.getIsProsecutor())) {
|
|
||||||
map.put("isProsecutor", request.getIsProsecutor());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(request.getCountry())) {
|
if (StringUtils.isNotBlank(request.getCountry())) {
|
||||||
map.put("country", request.getCountry());
|
map.put("country", request.getCountry());
|
||||||
// 根据省市查询
|
// 根据省市查询
|
||||||
@ -337,23 +333,6 @@ public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserS
|
|||||||
return update(lambdaUpdateWrapper);
|
return update(lambdaUpdateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean batchSetProsecutor(String id) {
|
|
||||||
if (StrUtil.isBlank(id)) throw new CrmebException("会员编号不能为空");
|
|
||||||
List<Integer> idList = CrmebUtil.stringToArray(id);
|
|
||||||
List<User> list = getListInUid(idList);
|
|
||||||
if (CollUtil.isEmpty(list)) throw new CrmebException("没有找到用户信息");
|
|
||||||
List<User> upd = new ArrayList<>();
|
|
||||||
for (User user : list) {
|
|
||||||
Integer isProsecutor = user.getIsProsecutor();
|
|
||||||
// 是否核销员:0否,1是
|
|
||||||
if (null != isProsecutor && isProsecutor == 1) { continue; }
|
|
||||||
user.setIsProsecutor(1);
|
|
||||||
upd.add(user);
|
|
||||||
}
|
|
||||||
if (upd.size() == 0) { return true; }
|
|
||||||
return updateBatchById(upd);
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 会员分组
|
* 会员分组
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user