Compare commits

...

4 Commits

Author SHA1 Message Date
gaowdong 69e6660e81 替换 cust_info 表为 sys_user 2025-03-13 18:16:12 +08:00
gaowdong e01f117a07 Merge remote-tracking branch 'origin/master' into replace_table 2025-03-12 16:24:33 +08:00
sxu d0d82b173b Merge branch 'ah-sbd-h5' 2025-03-12 10:17:54 +08:00
gaowdong 29676f8ef6 订单log 2025-03-12 10:15:09 +08:00
49 changed files with 1056 additions and 1385 deletions

View File

@ -23,8 +23,8 @@ public class AppWorkAccInfoVO {
@ApiModelProperty("手机号")
@LeNiuDecryptField
private String mobile;
@ApiModelProperty("组织全称")
private String orgFullName;
// @ApiModelProperty("组织全称")
// private String orgFullName;
@ApiModelProperty("人员类别名称")
private String psnTypeName;
@ApiModelProperty("账户余额")
@ -70,9 +70,9 @@ public class AppWorkAccInfoVO {
return this.mobile;
}
public String getOrgFullName() {
return this.orgFullName;
}
// public String getOrgFullName() {
// return this.orgFullName;
// }
public String getPsnTypeName() {
return this.psnTypeName;
@ -134,9 +134,9 @@ public class AppWorkAccInfoVO {
this.mobile = mobile;
}
public void setOrgFullName(final String orgFullName) {
this.orgFullName = orgFullName;
}
// public void setOrgFullName(final String orgFullName) {
// this.orgFullName = orgFullName;
// }
public void setPsnTypeName(final String psnTypeName) {
this.psnTypeName = psnTypeName;

View File

@ -33,10 +33,10 @@
t1.serial_num,
t1.amount AS realAmount,
t1.remark AS errorMsg,
t2.cust_name,
t2.nick_name as cust_name,
t2.cust_num,
t2.mobile,
t2.org_full_name,
t2.phonenumber as mobile,
# t2.org_full_name,
t4.order_id,
t4.mac_order_id,
t4.order_time,
@ -50,7 +50,7 @@
t4.nu_clear_mode
FROM
acc_exception_record AS t1
LEFT JOIN cust_info AS t2 ON t1.cust_id = t2.cust_id
LEFT JOIN sys_user AS t2 ON t1.cust_id = t2.cust_id
LEFT JOIN trade_order_recharge AS t3 ON t3.trade_id = t1.relation_id
LEFT JOIN order_info AS t4 ON t4.order_id = t3.order_recharge_id
LEFT JOIN device_info t5 ON t5.device_sn = t4.machine_sn
@ -64,7 +64,7 @@
SUM(t1.amount) AS realAmount
FROM
acc_exception_record AS t1
LEFT JOIN cust_info AS t2 ON t1.cust_id = t2.cust_id
LEFT JOIN sys_user AS t2 ON t1.cust_id = t2.cust_id
LEFT JOIN trade_order_recharge AS t3 ON t3.trade_id = t1.relation_id
LEFT JOIN order_info AS t4 ON t4.order_id = t3.order_recharge_id
LEFT JOIN device_info t5 ON t5.device_sn = t4.machine_sn
@ -86,10 +86,10 @@
</if>
<if test="param.keyword != null and param.keyword != '' ">
and (t2.cust_num LIKE CONCAT('%', #{param.keyword},'%')
or t2.cust_name = #{param.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.mobile = #{param.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.mobile_suffix = #{param.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.cust_name_like LIKE CONCAT('%',#{param.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
or t2.nick_name = #{param.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.phonenumber = #{param.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# or t2.mobile_suffix = #{param.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.nick_name_like LIKE CONCAT('%',#{param.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
)
</if>
<if test="param.macOrderId != null">

View File

@ -48,11 +48,11 @@ public interface AccInfoMapper extends BaseMapper<AccInfo> {
)
List<AccInfoPageVO> queryPageAccInfoForBatch(@Param("infoParam") AccInfoPageDTO accPageParam);
@LeNiuDataPermission(
alias = "t2",
permissionType = DataPermissionTypeEnum.PERMISSION_ORG
)
List<Long> queryAccIdByParam(@Param("infoParam") AccInfoPageDTO accPageParam);
// @LeNiuDataPermission(
// alias = "t2",
// permissionType = DataPermissionTypeEnum.PERMISSION_ORG
// )
// List<Long> queryAccIdByParam(@Param("infoParam") AccInfoPageDTO accPageParam);
Integer updateStateByOverdue(@Param("overdueDate") LocalDate overdueDate, @Param("changeStatus") Integer changeStatus, @Param("oldStatusList") List<Integer> oldStatusList);

View File

@ -51,8 +51,8 @@ public class AccExceptionRecordVO {
private String custName;
@ApiModelProperty("用户手机号")
private String mobile;
@ApiModelProperty("所属组织")
private String orgFullName;
// @ApiModelProperty("所属组织")
// private String orgFullName;
public String getSourceTypeName() {
return SourceTypeEnum.getDesc(this.sourceType);
@ -146,9 +146,9 @@ public class AccExceptionRecordVO {
return this.mobile;
}
public String getOrgFullName() {
return this.orgFullName;
}
// public String getOrgFullName() {
// return this.orgFullName;
// }
public void setRecordId(final Long recordId) {
this.recordId = recordId;
@ -242,7 +242,7 @@ public class AccExceptionRecordVO {
this.mobile = mobile;
}
public void setOrgFullName(final String orgFullName) {
this.orgFullName = orgFullName;
}
// public void setOrgFullName(final String orgFullName) {
// this.orgFullName = orgFullName;
// }
}

View File

@ -21,8 +21,8 @@ public class AccExistFrozenListVO {
@ApiModelProperty("手机号")
@LeNiuDecryptField(HandleType.DESENSITIZE_MOBILE_PHONE)
private String mobile;
@ApiModelProperty("机构全称")
private String orgFullName;
// @ApiModelProperty("机构全称")
// private String orgFullName;
@ApiModelProperty("人员类别")
private Integer psnType;
@ApiModelProperty("人员类别名称")
@ -46,9 +46,9 @@ public class AccExistFrozenListVO {
return this.mobile;
}
public String getOrgFullName() {
return this.orgFullName;
}
// public String getOrgFullName() {
// return this.orgFullName;
// }
public Integer getPsnType() {
return this.psnType;
@ -78,9 +78,9 @@ public class AccExistFrozenListVO {
this.mobile = mobile;
}
public void setOrgFullName(final String orgFullName) {
this.orgFullName = orgFullName;
}
// public void setOrgFullName(final String orgFullName) {
// this.orgFullName = orgFullName;
// }
public void setPsnType(final Integer psnType) {
this.psnType = psnType;

View File

@ -45,12 +45,12 @@ public class AccInfoPageVO {
)
@LeNiuDecryptField(HandleType.DESENSITIZE_MOBILE_PHONE)
private String mobile;
@ApiModelProperty("所属组织")
@ExcelProperty(
value = {"所属组织"},
order = 4
)
private String orgFullName;
// @ApiModelProperty("所属组织")
// @ExcelProperty(
// value = {"所属组织"},
// order = 4
// )
// private String orgFullName;
@ApiModelProperty("用户类别")
private Integer psnType;
@ApiModelProperty("用户类别(展示)")
@ -159,9 +159,9 @@ public class AccInfoPageVO {
return this.mobile;
}
public String getOrgFullName() {
return this.orgFullName;
}
// public String getOrgFullName() {
// return this.orgFullName;
// }
public Integer getPsnType() {
return this.psnType;
@ -247,9 +247,9 @@ public class AccInfoPageVO {
this.mobile = mobile;
}
public void setOrgFullName(final String orgFullName) {
this.orgFullName = orgFullName;
}
// public void setOrgFullName(final String orgFullName) {
// this.orgFullName = orgFullName;
// }
public void setPsnType(final Integer psnType) {
this.psnType = psnType;

View File

@ -10,6 +10,6 @@ import java.util.List;
@Mapper
public interface AccCardMapper extends BaseMapper<AccCard> {
@Select({"SELECT ci.cust_num, ac.serial_num FROM acc_card ac LEFT JOIN cust_info ci ON ac.cust_id = ci.cust_id where ac.card_status in (1,4)"})
@Select({"SELECT ci.cust_num, ac.serial_num FROM acc_card ac LEFT JOIN sys_user ci ON ac.cust_id = ci.cust_id where ac.card_status in (1,4)"})
List<AccCardBaseInfoVO> listAccCardBaseInfo();
}

View File

@ -10,14 +10,14 @@ import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
@TableName(
value = "mgr_user",
autoResultMap = true
)
//@TableName(
// value = "sys_user",
// autoResultMap = true
//)
@ApiModel("商家管理员用户信息")
public class MgrUser extends Model<MgrUser> {
private static final long serialVersionUID = 1L;
@TableId
// @TableId
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("用户编号")
@ -29,24 +29,24 @@ public class MgrUser extends Model<MgrUser> {
private Long custId;
private Long areaId;
@ApiModelProperty("真实姓名")
@TableField(
value = "real_name",
typeHandler = SM4EncDecHandler.class
)
// @TableField(
// value = "real_name",
// typeHandler = SM4EncDecHandler.class
// )
private String realName;
@ApiModelProperty("随机盐")
private String salt;
@ApiModelProperty("电话号码")
@TableField(
value = "phone",
typeHandler = SM4EncDecHandler.class
)
// @TableField(
// value = "phone",
// typeHandler = SM4EncDecHandler.class
// )
private String phone;
@ApiModelProperty("电话号码后缀")
@TableField(
value = "phone_suffix",
typeHandler = SM4EncDecHandler.class
)
// @TableField(
// value = "phone_suffix",
// typeHandler = SM4EncDecHandler.class
// )
private String phoneSuffix;
@ApiModelProperty("操作员头像")
private String avatar;

View File

@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface MgrUserMapper extends BaseMapper<MgrUser> {
public interface MgrUserMapper {
// Page<MgrUserPageVO> selectRolePage(Page<MgrUserPageVO> page, @Param("userPageDTO") MgrUserPageDTO userPageDTO);
List<MgrRoleUserVO> selectAllUserByRoleCode(MgrRoleUserDTO deliveryUserDTO);

View File

@ -7,15 +7,17 @@ import com.bonus.canteen.core.auth.role.vo.MgrRoleUserVO;
import com.bonus.canteen.core.auth.user.entity.MgrUser;
import com.bonus.canteen.core.auth.user.mapper.MgrUserMapper;
import com.bonus.canteen.core.customer.utils.DelFlagEnum;
import com.bonus.canteen.core.customer.constants.PersonalStatusEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class MgrUserService extends ServiceImpl<MgrUserMapper, MgrUser> {
public class MgrUserService {
private static final Logger log = LoggerFactory.getLogger(MgrUserService.class);
private static final String USER_LOCK = "user-lock-";
private static final BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
@ -31,8 +33,8 @@ public class MgrUserService extends ServiceImpl<MgrUserMapper, MgrUser> {
// private AllocLogRecordService allocLogRecordService;
// @Autowired
// private MgrUserRoleMapper mgrUserRoleMapper;
// @Autowired
// private MgrUserMapper mgrUserMapper;
@Autowired
private MgrUserMapper mgrUserMapper;
// @Autowired
// private MgrRoleMapper mgrRoleMapper;
// @Autowired
@ -459,9 +461,9 @@ public class MgrUserService extends ServiceImpl<MgrUserMapper, MgrUser> {
public List<MgrRoleUserVO> getAllUserByRoleCode(MgrRoleUserListDTO content) {
MgrRoleUserDTO roleUserDTO = new MgrRoleUserDTO();
roleUserDTO.setDelFlag(DelFlagEnum.DEL_FALSE.key());
roleUserDTO.setDelFlag(PersonalStatusEnum.NORMAL.getKey());
roleUserDTO.setRoleCode(content.getRoleCode());
return ((MgrUserMapper)this.baseMapper).selectAllUserByRoleCode(roleUserDTO);
return mgrUserMapper.selectAllUserByRoleCode(roleUserDTO);
}
//
// private void insertUserRoleBatch(Long adminRoleId, Long orgRoleId, Long merchantRoleId, Integer defaultRole, Long userId) {

View File

@ -1,8 +1,11 @@
package com.bonus.canteen.core.customer.constants;
public enum PersonalStatusEnum {
NORMAL(1, "正常"),
CLOSE(2, "注销");
// NORMAL(1, "正常"),
// CLOSE(2, "注销");
NORMAL(0, "正常"),
CLOSE(1, "停用");
private final Integer key;
private final String desc;

View File

@ -30,24 +30,24 @@ public interface CustInfoMapper extends BaseMapper<CustInfo> {
CustInfoVo queryCustInfo(@Param("info") CustInfoDTO info);
@Select({"select c.cust_id, c.cust_name, c.mobile from cust_info c inner join acc_card a on c.cust_id = a.cust_id where a.serial_num = #{serialNum}"})
@Select({"select c.cust_id, c.nick_name as cust_name, c.phonenumber as mobile from sys_user c inner join acc_card a on c.cust_id = a.cust_id where a.serial_num = #{serialNum}"})
CustInfo queryCustBySerialNum(String serialNum);
@Select({"select cust_id from cust_info where cust_num = #{custNum} and cust_state=1"})
@Select({"select cust_id from sys_user where cust_num = #{custNum} and status=0"})
Long selectCustIdByCustNum(String custNum);
@Select({"SELECT cust_id FROM cust_info where cust_third_id = #{custThirdId} and cust_state = 1"})
Long queryCustIdByCustThirdId(String custThirdId);
// @Select({"SELECT cust_id FROM sys_user where cust_third_id = #{custThirdId} and status = 0"})
// Long queryCustIdByCustThirdId(String custThirdId);
@Select({"select cust_num, cust_name, org_full_name, cust_photo_url, ai.acc_bal from cust_info ci left join acc_info ai on ci.cust_id = ai.cust_id where ci.cust_id = #{custId} "})
MacOrdCurrWriteOffVO getCustAccInfoByCustId(@Param("custId") Long custId);
// @Select({"select cust_num, cust_name, org_full_name, cust_photo_url, ai.acc_bal from sys_user ci left join acc_info ai on ci.cust_id = ai.cust_id where ci.cust_id = #{custId} "})
// MacOrdCurrWriteOffVO getCustAccInfoByCustId(@Param("custId") Long custId);
// CustInfoForRechargeVO getCustInfoForRechargeByCustNum(@Param("custNum") String custNum, @Param("custState") Integer custState);
// List<CustInfoForRechargeVO> listCustInfoForRechargeByCustNums(@Param("custNumList") List<String> custNumList, @Param("custState") Integer custState);
@Select({"SELECT DISTINCT t1.cust_num FROM cust_info t1 LEFT JOIN cust_photo t2 ON t1.cust_id = t2.cust_id WHERE t1.cust_state = 1 AND t2.features_build_status IS NULL OR t2.features_build_status = 1"})
@Select({"SELECT DISTINCT t1.cust_num FROM sys_user t1 LEFT JOIN cust_photo t2 ON t1.cust_id = t2.cust_id WHERE t1.status = 0 AND t2.features_build_status IS NULL OR t2.features_build_status = 1"})
List<String> listCustNumNonFeatures();
// Long queryOrgManagerCustIdByCustId(@Param("custId") Long custId);
@ -62,7 +62,7 @@ public interface CustInfoMapper extends BaseMapper<CustInfo> {
int updateCustCasual(CustCasual custCasual);
List<CustomerNumByOrgIdMapperPO> getCustomerNumByOrgIdList(@Param("orgIdList") Collection<Long> orgIdList);
// List<CustomerNumByOrgIdMapperPO> getCustomerNumByOrgIdList(@Param("orgIdList") Collection<Long> orgIdList);
// @LeNiuDataPermission(
// alias = "ci",

View File

@ -36,37 +36,37 @@ public class CustInfoOpenApi {
infoModel.setBirthday(custInfo.getBirthday());
}
if (infoModel.getPlaceId() == null || infoModel.getPlaceId() == CustConstant.DATA_DEFAULT_LONG) {
infoModel.setPlaceId(custInfo.getPlaceId());
}
if (infoModel.getPlaceFullName() == null || "".equals(infoModel.getPlaceFullName())) {
infoModel.setPlaceFullName(custInfo.getPlaceFullName());
}
// if (infoModel.getPlaceId() == null || infoModel.getPlaceId() == CustConstant.DATA_DEFAULT_LONG) {
// infoModel.setPlaceId(custInfo.getPlaceId());
// }
//
// if (infoModel.getPlaceFullName() == null || "".equals(infoModel.getPlaceFullName())) {
// infoModel.setPlaceFullName(custInfo.getPlaceFullName());
// }
if (ObjectUtil.isNull(infoModel.getOrgId())) {
infoModel.setOrgId(custInfo.getOrgId());
}
if (ObjectUtil.isNull(infoModel.getEthnicityCode())) {
infoModel.setEthnicityCode(custInfo.getEthnicityCode());
}
if (ObjectUtil.isNull(infoModel.getCostCenterId())) {
infoModel.setCostCenterId(custInfo.getCostCenterId());
}
if (ObjectUtil.isNull(infoModel.getEntryDate())) {
infoModel.setEntryDate(custInfo.getEntryDate());
}
if (ObjectUtil.isNull(infoModel.getSigningDate())) {
infoModel.setSigningDate(custInfo.getSigningDate());
}
if (ObjectUtil.isNull(infoModel.getExpiryDate())) {
infoModel.setExpiryDate(custInfo.getExpiryDate());
}
// if (ObjectUtil.isNull(infoModel.getEthnicityCode())) {
// infoModel.setEthnicityCode(custInfo.getEthnicityCode());
// }
//
// if (ObjectUtil.isNull(infoModel.getCostCenterId())) {
// infoModel.setCostCenterId(custInfo.getCostCenterId());
// }
//
// if (ObjectUtil.isNull(infoModel.getEntryDate())) {
// infoModel.setEntryDate(custInfo.getEntryDate());
// }
//
// if (ObjectUtil.isNull(infoModel.getSigningDate())) {
// infoModel.setSigningDate(custInfo.getSigningDate());
// }
//
// if (ObjectUtil.isNull(infoModel.getExpiryDate())) {
// infoModel.setExpiryDate(custInfo.getExpiryDate());
// }
}

View File

@ -77,16 +77,16 @@ public class CustInfoCheckServiceImpl implements CustInfoCheckService {
}
protected void checkDBBankCardNum(CustInfoModel infoModel) {
if (!CharSequenceUtil.isBlank(infoModel.getBankCardNum())) {
long count = this.custInfoService.count(Wrappers.<CustInfo>lambdaQuery()
.eq(CustInfo::getBankCardNum, infoModel.getBankCardNum())
.eq(CustInfo::getCustState, PersonalStatusEnum.NORMAL.getKey())
.ne(ObjectUtil.isNotNull(infoModel.getCustId()), CustInfo::getCustId, infoModel.getCustId()));
if (count > 0L) {
throw new ServiceException(I18n.getMessage("customer.bankCard.repetition", new Object[0]));
}
}
// if (!CharSequenceUtil.isBlank(infoModel.getBankCardNum())) {
//
// long count = this.custInfoService.count(Wrappers.<CustInfo>lambdaQuery()
// .eq(CustInfo::getBankCardNum, infoModel.getBankCardNum())
// .eq(CustInfo::getCustState, PersonalStatusEnum.NORMAL.getKey())
// .ne(ObjectUtil.isNotNull(infoModel.getCustId()), CustInfo::getCustId, infoModel.getCustId()));
// if (count > 0L) {
// throw new ServiceException(I18n.getMessage("customer.bankCard.repetition", new Object[0]));
// }
// }
}
public void checkCustomerExcelImportData(List<CustErrorToLead> saveErrorDataList, List<CustAccExcelModel> importDataList) {

View File

@ -328,14 +328,14 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> i
protected CustInfo update(@NotNull CustInfoModel infoModel) {
CustInfo custInfo = new CustInfo();
BeanUtil.copyProperties(infoModel, custInfo, new String[0]);
if (ObjectUtil.isNotEmpty(custInfo.getBirthday())) {
custInfo.setAge(DateUtil.ageOfNow(custInfo.getBirthday().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))));
}
BeanUtil.copyProperties(infoModel, custInfo);
// if (ObjectUtil.isNotEmpty(custInfo.getBirthday())) {
// custInfo.setAge(DateUtil.ageOfNow(custInfo.getBirthday().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))));
// }
if (CharSequenceUtil.isNotBlank(custInfo.getMobile()) && custInfo.getMobile().length() > 4) {
custInfo.setMobileSuffix(custInfo.getMobile().substring(custInfo.getMobile().length() - 4));
}
// if (CharSequenceUtil.isNotBlank(custInfo.getMobile()) && custInfo.getMobile().length() > 4) {
// custInfo.setMobileSuffix(custInfo.getMobile().substring(custInfo.getMobile().length() - 4));
// }
if (ObjectUtil.isNotEmpty(custInfo.getCustName())) {
custInfo.setCustNameLike(custInfo.getCustName());
@ -343,17 +343,18 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> i
BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder();
custInfo.setPwd(bCrypt.encode(custInfo.getPwd()));
custInfo.setPsnType(custInfo.getPsnType()).setBirthday(custInfo.getBirthday()).setAge(custInfo.getAge()).setPlaceId(custInfo.getPlaceId() == null ? CustConstant.DATA_DEFAULT_LONG : custInfo.getPlaceId()).setSex((Integer)Optional.ofNullable(infoModel.getSex()).orElse(3));
custInfo.setPsnType(custInfo.getPsnType()).setBirthday(custInfo.getBirthday()).setSex((Integer)Optional.ofNullable(infoModel.getSex()).orElse(2));
// custInfo.setPsnType(custInfo.getPsnType()).setBirthday(custInfo.getBirthday()).setAge(custInfo.getAge()).setPlaceId(custInfo.getPlaceId() == null ? CustConstant.DATA_DEFAULT_LONG : custInfo.getPlaceId()).setSex((Integer)Optional.ofNullable(infoModel.getSex()).orElse(3));
// ((CustInfoMapper)this.baseMapper).update(custInfo, (Wrapper)(new LambdaUpdateWrapper(CustInfo.class)).eq(CustInfo::getCustId, infoModel.getCustId()));
custInfoMapper.update(custInfo, new LambdaUpdateWrapper<CustInfo>().eq(CustInfo::getCustId, infoModel.getCustId()));
return custInfo;
}
protected void unbindPlace(Long placeId) {
if (!ObjectUtil.isNull(placeId) && !CustConstant.DATA_DEFAULT_LONG.equals(placeId)) {
//((CustInfoMapper)this.baseMapper).update((Object)null, (Wrapper)((LambdaUpdateWrapper) Wrappers.lambdaUpdate().eq(CustInfo::getPlaceId, placeId)).set(CustInfo::getPlaceId, CustConstant.DATA_DEFAULT_LONG));
custInfoMapper.update(null, Wrappers.<CustInfo>lambdaUpdate().eq(CustInfo::getPlaceId, placeId).set(CustInfo::getPlaceId, CustConstant.DATA_DEFAULT_LONG));
}
}
// protected void unbindPlace(Long placeId) {
// if (!ObjectUtil.isNull(placeId) && !CustConstant.DATA_DEFAULT_LONG.equals(placeId)) {
// //((CustInfoMapper)this.baseMapper).update((Object)null, (Wrapper)((LambdaUpdateWrapper) Wrappers.lambdaUpdate().eq(CustInfo::getPlaceId, placeId)).set(CustInfo::getPlaceId, CustConstant.DATA_DEFAULT_LONG));
// custInfoMapper.update(null, Wrappers.<CustInfo>lambdaUpdate().eq(CustInfo::getPlaceId, placeId).set(CustInfo::getPlaceId, CustConstant.DATA_DEFAULT_LONG));
// }
// }
protected void saveOrgAdjust(CustInfoModel newcustInfoModel) {
Long newOrgId = newcustInfoModel.getOrgId();
@ -406,7 +407,7 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> i
public void updateDetailCustInfo(CustInfoModel infoModel) {
this.custInfoBurialPointBusiness.willAddOrUpdateCust(infoModel);
this.custInfoCheckService.checkCustInfoOnlyAndSetRedundantData(infoModel);
this.unbindPlace(infoModel.getPlaceId());
// this.unbindPlace(infoModel.getPlaceId());
this.saveOrgAdjust(infoModel);
CustInfo custInfo = this.update(infoModel);
this.custDiningPlaceService.save(infoModel.getCustId(), infoModel.getDiningPlace());

View File

@ -2,8 +2,11 @@ package com.bonus.canteen.core.customer.v4.mobile.service;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bonus.canteen.core.customer.utils.CustomerUtil;
import com.bonus.canteen.core.device.android.constant.DeviceMqMessage;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.canteen.core.common.utils.SysUtil;
import com.bonus.canteen.core.customer.mapper.CustInfoMapper;
@ -70,7 +73,7 @@ public class CustomerMobileService extends ServiceImpl<CustInfoMapper, CustInfo>
}
}
public void activateFacePhoto(ProfilePhotoDTO content) {
// public void activateFacePhoto(ProfilePhotoDTO content) {
// long count = this.custInfoService.count((Wrapper)Wrappers.lambdaQuery(CustInfo.class).eq(CustInfo::getCustId, content.getCustId()));
// if (count == 0L) {
// throw new ServiceException(I18n.getMessage("customer.customer.inExists", new Object[0]));
@ -78,53 +81,6 @@ public class CustomerMobileService extends ServiceImpl<CustInfoMapper, CustInfo>
// this.custPhotoService.update((Wrapper)((LambdaUpdateWrapper)Wrappers.lambdaUpdate(CustPhoto.class).set(CustPhoto::getExpireDate, CustomerUtil.getExpireDate(content.getExpirDay()))).eq(CustPhoto::getCustId, content.getCustId()));
// DeviceMqMessage.deviceUpdatePersonalValidityConfigV4();
// }
}
// $FF: synthetic method
// private static Object $deserializeLambda$(SerializedLambda lambda) {
// switch (lambda.getImplMethodName()) {
// case "getUptime":
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustPhoto") && lambda.getImplMethodSignature().equals("()Ljava/time/LocalDateTime;")) {
// return CustPhoto::getUptime;
// }
// break;
// case "getHeadPortraitUrl":
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustInfo") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
// return CustInfo::getHeadPortraitUrl;
// }
// break;
// case "getCustId":
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustInfo") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
// return CustInfo::getCustId;
// }
//
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustInfo") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
// return CustInfo::getCustId;
// }
//
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustInfo") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
// return CustInfo::getCustId;
// }
//
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustPhoto") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
// return CustPhoto::getCustId;
// }
//
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustInfo") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
// return CustInfo::getCustId;
// }
//
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustPhoto") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
// return CustPhoto::getCustId;
// }
// break;
// case "getExpireDate":
// if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("net/xnzn/core/customer/model/CustPhoto") && lambda.getImplMethodSignature().equals("()Ljava/time/LocalDate;")) {
// return CustPhoto::getExpireDate;
// }
// }
//
// throw new IllegalArgumentException("Invalid lambda deserialization");
// }
}

View File

@ -26,19 +26,19 @@ public class CustPayVO implements Serializable {
private String psnTypeName;
@ApiModelProperty("人员所属组织id")
private Long orgId;
@ApiModelProperty("第三方人员id")
private String custThirdId;
@ApiModelProperty("人员状态 1-正常 2-注销")
// @ApiModelProperty("第三方人员id")
// private String custThirdId;
@ApiModelProperty("人员状态 0-正常 1-停用")
private Integer custState;
@ApiModelProperty("人员编号")
private String custNum;
@ApiModelProperty("人员姓名")
@LeNiuDecryptField
private String custName;
@ApiModelProperty("机构全称")
private String orgNum;
@ApiModelProperty("机构全称")
private String orgFullName;
// @ApiModelProperty("机构全称")
// private String orgNum;
// @ApiModelProperty("机构全称")
// private String orgFullName;
@ApiModelProperty("人脸照片地址")
private String custPhotoUrl;
@ApiModelProperty("手机号")
@ -52,8 +52,8 @@ public class CustPayVO implements Serializable {
private Integer cardStatus;
@ApiModelProperty("卡片有效期")
private LocalDate validityDate;
@ApiModelProperty("支付宝签约号")
private String alipayContractNum;
// @ApiModelProperty("支付宝签约号")
// private String alipayContractNum;
private List<CardInfoVO> cardInfos;
@ApiModelProperty("头像地址")
private String headPortraitUrl;
@ -86,9 +86,9 @@ public class CustPayVO implements Serializable {
return this.orgId;
}
public String getCustThirdId() {
return this.custThirdId;
}
// public String getCustThirdId() {
// return this.custThirdId;
// }
public Integer getCustState() {
return this.custState;
@ -102,13 +102,13 @@ public class CustPayVO implements Serializable {
return this.custName;
}
public String getOrgNum() {
return this.orgNum;
}
// public String getOrgNum() {
// return this.orgNum;
// }
public String getOrgFullName() {
return this.orgFullName;
}
// public String getOrgFullName() {
// return this.orgFullName;
// }
public String getMobile() {
return this.mobile;
@ -130,9 +130,9 @@ public class CustPayVO implements Serializable {
return this.validityDate;
}
public String getAlipayContractNum() {
return this.alipayContractNum;
}
// public String getAlipayContractNum() {
// return this.alipayContractNum;
// }
public List<CardInfoVO> getCardInfos() {
return this.cardInfos;
@ -154,9 +154,9 @@ public class CustPayVO implements Serializable {
this.orgId = orgId;
}
public void setCustThirdId(final String custThirdId) {
this.custThirdId = custThirdId;
}
// public void setCustThirdId(final String custThirdId) {
// this.custThirdId = custThirdId;
// }
public void setCustState(final Integer custState) {
this.custState = custState;
@ -170,13 +170,13 @@ public class CustPayVO implements Serializable {
this.custName = custName;
}
public void setOrgNum(final String orgNum) {
this.orgNum = orgNum;
}
// public void setOrgNum(final String orgNum) {
// this.orgNum = orgNum;
// }
public void setOrgFullName(final String orgFullName) {
this.orgFullName = orgFullName;
}
// public void setOrgFullName(final String orgFullName) {
// this.orgFullName = orgFullName;
// }
public void setCustPhotoUrl(final String custPhotoUrl) {
this.custPhotoUrl = custPhotoUrl;
@ -202,9 +202,9 @@ public class CustPayVO implements Serializable {
this.validityDate = validityDate;
}
public void setAlipayContractNum(final String alipayContractNum) {
this.alipayContractNum = alipayContractNum;
}
// public void setAlipayContractNum(final String alipayContractNum) {
// this.alipayContractNum = alipayContractNum;
// }
public void setCardInfos(final List<CardInfoVO> cardInfos) {
this.cardInfos = cardInfos;

View File

@ -135,7 +135,9 @@ public class NutritionDeviceApi {
}
NutrReferenceIntakeVO custIntake = (NutrReferenceIntakeVO)Optional.ofNullable(this.healthCateringService.getCustIntake(custId)).orElse(new NutrReferenceIntakeVO());
builder.custName(custInfo.getCustName()).age(custInfo.getAge()).orgFullName(custInfo.getOrgFullName()).calories(actual.getCalories()).protein(actual.getProtein()).fat(actual.getFat()).carbohydrate(actual.getCarbohydrate()).dietaryFiber(actual.getDietaryFiber()).cholesterol(actual.getCholesterol()).referenceCalories(NuConvertUtil.toTwo(custIntake.getCalories())).referenceProtein(NuConvertUtil.toTwo(custIntake.getProtein())).referenceFat(NuConvertUtil.toTwo(custIntake.getFat())).referenceCarbohydrate(NuConvertUtil.toTwo(custIntake.getCarbohydrate())).referenceDietaryFiber(NuConvertUtil.toTwo(custIntake.getDietaryFiber())).cholesterol(NuConvertUtil.toTwo(custIntake.getCholesterol())).caloriesIndex(this.getIndex(actual.getCalories(), NuConvertUtil.toTwo(custIntake.getCalories()))).proteinIndex(this.getIndex(actual.getProtein(), NuConvertUtil.toTwo(custIntake.getProtein()))).fatIndex(this.getIndex(actual.getFat(), NuConvertUtil.toTwo(custIntake.getFat()))).carbohydrateIndex(this.getIndex(actual.getCarbohydrate(), NuConvertUtil.toTwo(custIntake.getCarbohydrate()))).dietaryFiberIndex(this.getIndex(actual.getDietaryFiber(), NuConvertUtil.toTwo(custIntake.getDietaryFiber()))).cholesterolIndex(this.getIndex(actual.getCholesterol(), NuConvertUtil.toTwo(custIntake.getCholesterol())));
//builder.custName(custInfo.getCustName()).age(custInfo.getAge()).orgFullName(custInfo.getOrgFullName()).calories(actual.getCalories()).protein(actual.getProtein()).fat(actual.getFat()).carbohydrate(actual.getCarbohydrate()).dietaryFiber(actual.getDietaryFiber()).cholesterol(actual.getCholesterol()).referenceCalories(NuConvertUtil.toTwo(custIntake.getCalories())).referenceProtein(NuConvertUtil.toTwo(custIntake.getProtein())).referenceFat(NuConvertUtil.toTwo(custIntake.getFat())).referenceCarbohydrate(NuConvertUtil.toTwo(custIntake.getCarbohydrate())).referenceDietaryFiber(NuConvertUtil.toTwo(custIntake.getDietaryFiber())).cholesterol(NuConvertUtil.toTwo(custIntake.getCholesterol())).caloriesIndex(this.getIndex(actual.getCalories(), NuConvertUtil.toTwo(custIntake.getCalories()))).proteinIndex(this.getIndex(actual.getProtein(), NuConvertUtil.toTwo(custIntake.getProtein()))).fatIndex(this.getIndex(actual.getFat(), NuConvertUtil.toTwo(custIntake.getFat()))).carbohydrateIndex(this.getIndex(actual.getCarbohydrate(), NuConvertUtil.toTwo(custIntake.getCarbohydrate()))).dietaryFiberIndex(this.getIndex(actual.getDietaryFiber(), NuConvertUtil.toTwo(custIntake.getDietaryFiber()))).cholesterolIndex(this.getIndex(actual.getCholesterol(), NuConvertUtil.toTwo(custIntake.getCholesterol())));
builder.custName(custInfo.getCustName()).calories(actual.getCalories()).protein(actual.getProtein()).fat(actual.getFat()).carbohydrate(actual.getCarbohydrate()).dietaryFiber(actual.getDietaryFiber()).cholesterol(actual.getCholesterol()).referenceCalories(NuConvertUtil.toTwo(custIntake.getCalories())).referenceProtein(NuConvertUtil.toTwo(custIntake.getProtein())).referenceFat(NuConvertUtil.toTwo(custIntake.getFat())).referenceCarbohydrate(NuConvertUtil.toTwo(custIntake.getCarbohydrate())).referenceDietaryFiber(NuConvertUtil.toTwo(custIntake.getDietaryFiber())).cholesterol(NuConvertUtil.toTwo(custIntake.getCholesterol())).caloriesIndex(this.getIndex(actual.getCalories(), NuConvertUtil.toTwo(custIntake.getCalories()))).proteinIndex(this.getIndex(actual.getProtein(), NuConvertUtil.toTwo(custIntake.getProtein()))).fatIndex(this.getIndex(actual.getFat(), NuConvertUtil.toTwo(custIntake.getFat()))).carbohydrateIndex(this.getIndex(actual.getCarbohydrate(), NuConvertUtil.toTwo(custIntake.getCarbohydrate()))).dietaryFiberIndex(this.getIndex(actual.getDietaryFiber(), NuConvertUtil.toTwo(custIntake.getDietaryFiber()))).cholesterolIndex(this.getIndex(actual.getCholesterol(), NuConvertUtil.toTwo(custIntake.getCholesterol())));
return builder.build();
}

View File

@ -31,15 +31,15 @@ public class HealthInfoSimpleVo {
)
@LeNiuDecryptField
private String custName;
@ApiModelProperty("所属组织")
@ExcelIgnore
private String orgFullName;
@ApiModelProperty("位置信息")
@ExcelProperty(
value = {"位置信息"},
order = 2
)
private String placeFullName;
// @ApiModelProperty("所属组织")
// @ExcelIgnore
// private String orgFullName;
// @ApiModelProperty("位置信息")
// @ExcelProperty(
// value = {"位置信息"},
// order = 2
// )
// private String placeFullName;
@ApiModelProperty("手机号")
@LeNiuDecryptField(HandleType.DESENSITIZE_MOBILE_PHONE)
@ExcelProperty(
@ -145,13 +145,13 @@ public class HealthInfoSimpleVo {
return this.custName;
}
public String getOrgFullName() {
return this.orgFullName;
}
// public String getOrgFullName() {
// return this.orgFullName;
// }
public String getPlaceFullName() {
return this.placeFullName;
}
// public String getPlaceFullName() {
// return this.placeFullName;
// }
public String getMobile() {
return this.mobile;
@ -225,13 +225,13 @@ public class HealthInfoSimpleVo {
this.custName = custName;
}
public void setOrgFullName(final String orgFullName) {
this.orgFullName = orgFullName;
}
// public void setOrgFullName(final String orgFullName) {
// this.orgFullName = orgFullName;
// }
public void setPlaceFullName(final String placeFullName) {
this.placeFullName = placeFullName;
}
// public void setPlaceFullName(final String placeFullName) {
// this.placeFullName = placeFullName;
// }
public void setMobile(final String mobile) {
this.mobile = mobile;
@ -293,339 +293,9 @@ public class HealthInfoSimpleVo {
this.pregnantStatus = pregnantStatus;
}
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof HealthInfoSimpleVo)) {
return false;
} else {
HealthInfoSimpleVo other = (HealthInfoSimpleVo)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$custId = this.getCustId();
Object other$custId = other.getCustId();
if (this$custId == null) {
if (other$custId != null) {
return false;
}
} else if (!this$custId.equals(other$custId)) {
return false;
}
Object this$age = this.getAge();
Object other$age = other.getAge();
if (this$age == null) {
if (other$age != null) {
return false;
}
} else if (!this$age.equals(other$age)) {
return false;
}
Object this$sex = this.getSex();
Object other$sex = other.getSex();
if (this$sex == null) {
if (other$sex != null) {
return false;
}
} else if (!this$sex.equals(other$sex)) {
return false;
}
label254: {
Object this$doctorAdvice = this.getDoctorAdvice();
Object other$doctorAdvice = other.getDoctorAdvice();
if (this$doctorAdvice == null) {
if (other$doctorAdvice == null) {
break label254;
}
} else if (this$doctorAdvice.equals(other$doctorAdvice)) {
break label254;
}
return false;
}
label247: {
Object this$labourIntensity = this.getLabourIntensity();
Object other$labourIntensity = other.getLabourIntensity();
if (this$labourIntensity == null) {
if (other$labourIntensity == null) {
break label247;
}
} else if (this$labourIntensity.equals(other$labourIntensity)) {
break label247;
}
return false;
}
Object this$pregnantStatus = this.getPregnantStatus();
Object other$pregnantStatus = other.getPregnantStatus();
if (this$pregnantStatus == null) {
if (other$pregnantStatus != null) {
return false;
}
} else if (!this$pregnantStatus.equals(other$pregnantStatus)) {
return false;
}
label233: {
Object this$custNum = this.getCustNum();
Object other$custNum = other.getCustNum();
if (this$custNum == null) {
if (other$custNum == null) {
break label233;
}
} else if (this$custNum.equals(other$custNum)) {
break label233;
}
return false;
}
label226: {
Object this$custName = this.getCustName();
Object other$custName = other.getCustName();
if (this$custName == null) {
if (other$custName == null) {
break label226;
}
} else if (this$custName.equals(other$custName)) {
break label226;
}
return false;
}
Object this$orgFullName = this.getOrgFullName();
Object other$orgFullName = other.getOrgFullName();
if (this$orgFullName == null) {
if (other$orgFullName != null) {
return false;
}
} else if (!this$orgFullName.equals(other$orgFullName)) {
return false;
}
Object this$placeFullName = this.getPlaceFullName();
Object other$placeFullName = other.getPlaceFullName();
if (this$placeFullName == null) {
if (other$placeFullName != null) {
return false;
}
} else if (!this$placeFullName.equals(other$placeFullName)) {
return false;
}
label205: {
Object this$mobile = this.getMobile();
Object other$mobile = other.getMobile();
if (this$mobile == null) {
if (other$mobile == null) {
break label205;
}
} else if (this$mobile.equals(other$mobile)) {
break label205;
}
return false;
}
label198: {
Object this$custPhotoUrl = this.getCustPhotoUrl();
Object other$custPhotoUrl = other.getCustPhotoUrl();
if (this$custPhotoUrl == null) {
if (other$custPhotoUrl == null) {
break label198;
}
} else if (this$custPhotoUrl.equals(other$custPhotoUrl)) {
break label198;
}
return false;
}
Object this$birthday = this.getBirthday();
Object other$birthday = other.getBirthday();
if (this$birthday == null) {
if (other$birthday != null) {
return false;
}
} else if (!this$birthday.equals(other$birthday)) {
return false;
}
label184: {
Object this$height = this.getHeight();
Object other$height = other.getHeight();
if (this$height == null) {
if (other$height == null) {
break label184;
}
} else if (this$height.equals(other$height)) {
break label184;
}
return false;
}
Object this$weight = this.getWeight();
Object other$weight = other.getWeight();
if (this$weight == null) {
if (other$weight != null) {
return false;
}
} else if (!this$weight.equals(other$weight)) {
return false;
}
label170: {
Object this$bmi = this.getBmi();
Object other$bmi = other.getBmi();
if (this$bmi == null) {
if (other$bmi == null) {
break label170;
}
} else if (this$bmi.equals(other$bmi)) {
break label170;
}
return false;
}
Object this$chronicIds = this.getChronicIds();
Object other$chronicIds = other.getChronicIds();
if (this$chronicIds == null) {
if (other$chronicIds != null) {
return false;
}
} else if (!this$chronicIds.equals(other$chronicIds)) {
return false;
}
Object this$doctorNum = this.getDoctorNum();
Object other$doctorNum = other.getDoctorNum();
if (this$doctorNum == null) {
if (other$doctorNum != null) {
return false;
}
} else if (!this$doctorNum.equals(other$doctorNum)) {
return false;
}
Object this$hospitalNum = this.getHospitalNum();
Object other$hospitalNum = other.getHospitalNum();
if (this$hospitalNum == null) {
if (other$hospitalNum != null) {
return false;
}
} else if (!this$hospitalNum.equals(other$hospitalNum)) {
return false;
}
label142: {
Object this$inpatientDate = this.getInpatientDate();
Object other$inpatientDate = other.getInpatientDate();
if (this$inpatientDate == null) {
if (other$inpatientDate == null) {
break label142;
}
} else if (this$inpatientDate.equals(other$inpatientDate)) {
break label142;
}
return false;
}
label135: {
Object this$chronicNames = this.getChronicNames();
Object other$chronicNames = other.getChronicNames();
if (this$chronicNames == null) {
if (other$chronicNames == null) {
break label135;
}
} else if (this$chronicNames.equals(other$chronicNames)) {
break label135;
}
return false;
}
Object this$allergen = this.getAllergen();
Object other$allergen = other.getAllergen();
if (this$allergen == null) {
if (other$allergen != null) {
return false;
}
} else if (!this$allergen.equals(other$allergen)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof HealthInfoSimpleVo;
}
@Override
public int hashCode() {
int result = 1;
Object $custId = this.getCustId();
result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
Object $age = this.getAge();
result = result * 59 + ($age == null ? 43 : $age.hashCode());
Object $sex = this.getSex();
result = result * 59 + ($sex == null ? 43 : $sex.hashCode());
Object $doctorAdvice = this.getDoctorAdvice();
result = result * 59 + ($doctorAdvice == null ? 43 : $doctorAdvice.hashCode());
Object $labourIntensity = this.getLabourIntensity();
result = result * 59 + ($labourIntensity == null ? 43 : $labourIntensity.hashCode());
Object $pregnantStatus = this.getPregnantStatus();
result = result * 59 + ($pregnantStatus == null ? 43 : $pregnantStatus.hashCode());
Object $custNum = this.getCustNum();
result = result * 59 + ($custNum == null ? 43 : $custNum.hashCode());
Object $custName = this.getCustName();
result = result * 59 + ($custName == null ? 43 : $custName.hashCode());
Object $orgFullName = this.getOrgFullName();
result = result * 59 + ($orgFullName == null ? 43 : $orgFullName.hashCode());
Object $placeFullName = this.getPlaceFullName();
result = result * 59 + ($placeFullName == null ? 43 : $placeFullName.hashCode());
Object $mobile = this.getMobile();
result = result * 59 + ($mobile == null ? 43 : $mobile.hashCode());
Object $custPhotoUrl = this.getCustPhotoUrl();
result = result * 59 + ($custPhotoUrl == null ? 43 : $custPhotoUrl.hashCode());
Object $birthday = this.getBirthday();
result = result * 59 + ($birthday == null ? 43 : $birthday.hashCode());
Object $height = this.getHeight();
result = result * 59 + ($height == null ? 43 : $height.hashCode());
Object $weight = this.getWeight();
result = result * 59 + ($weight == null ? 43 : $weight.hashCode());
Object $bmi = this.getBmi();
result = result * 59 + ($bmi == null ? 43 : $bmi.hashCode());
Object $chronicIds = this.getChronicIds();
result = result * 59 + ($chronicIds == null ? 43 : $chronicIds.hashCode());
Object $doctorNum = this.getDoctorNum();
result = result * 59 + ($doctorNum == null ? 43 : $doctorNum.hashCode());
Object $hospitalNum = this.getHospitalNum();
result = result * 59 + ($hospitalNum == null ? 43 : $hospitalNum.hashCode());
Object $inpatientDate = this.getInpatientDate();
result = result * 59 + ($inpatientDate == null ? 43 : $inpatientDate.hashCode());
Object $chronicNames = this.getChronicNames();
result = result * 59 + ($chronicNames == null ? 43 : $chronicNames.hashCode());
Object $allergen = this.getAllergen();
result = result * 59 + ($allergen == null ? 43 : $allergen.hashCode());
return result;
}
@Override
public String toString() {
Long var10000 = this.getCustId();
return "HealthInfoSimpleVo(custId=" + var10000 + ", custNum=" + this.getCustNum() + ", custName=" + this.getCustName() + ", orgFullName=" + this.getOrgFullName() + ", placeFullName=" + this.getPlaceFullName() + ", mobile=" + this.getMobile() + ", custPhotoUrl=" + this.getCustPhotoUrl() + ", age=" + this.getAge() + ", sex=" + this.getSex() + ", birthday=" + String.valueOf(this.getBirthday()) + ", height=" + String.valueOf(this.getHeight()) + ", weight=" + String.valueOf(this.getWeight()) + ", bmi=" + String.valueOf(this.getBmi()) + ", chronicIds=" + this.getChronicIds() + ", doctorNum=" + this.getDoctorNum() + ", hospitalNum=" + this.getHospitalNum() + ", inpatientDate=" + String.valueOf(this.getInpatientDate()) + ", chronicNames=" + this.getChronicNames() + ", doctorAdvice=" + this.getDoctorAdvice() + ", allergen=" + this.getAllergen() + ", labourIntensity=" + this.getLabourIntensity() + ", pregnantStatus=" + this.getPregnantStatus() + ")";
return "HealthInfoSimpleVo(custId=" + var10000 + ", custNum=" + this.getCustNum() + ", custName=" + this.getCustName() + ", mobile=" + this.getMobile() + ", custPhotoUrl=" + this.getCustPhotoUrl() + ", age=" + this.getAge() + ", sex=" + this.getSex() + ", birthday=" + String.valueOf(this.getBirthday()) + ", height=" + String.valueOf(this.getHeight()) + ", weight=" + String.valueOf(this.getWeight()) + ", bmi=" + String.valueOf(this.getBmi()) + ", chronicIds=" + this.getChronicIds() + ", doctorNum=" + this.getDoctorNum() + ", hospitalNum=" + this.getHospitalNum() + ", inpatientDate=" + String.valueOf(this.getInpatientDate()) + ", chronicNames=" + this.getChronicNames() + ", doctorAdvice=" + this.getDoctorAdvice() + ", allergen=" + this.getAllergen() + ", labourIntensity=" + this.getLabourIntensity() + ", pregnantStatus=" + this.getPregnantStatus() + ")";
}
}

View File

@ -89,7 +89,7 @@ public class OrderPayAndroidVO implements OrderPayResult {
this.custId = custPayVO.getCustId();
this.custName = custPayVO.getCustName();
this.custNum = custPayVO.getCustNum();
this.orgFullName = custPayVO.getOrgFullName();
// this.orgFullName = custPayVO.getOrgFullName();
this.psnType = custPayVO.getPsnType();
this.psnTypeName = custPayVO.getPsnTypeName();
this.mobile = custPayVO.getMobile();

View File

@ -46,7 +46,7 @@ public class OrderTakeAndroidVO {
orderTakeAndroidVO.setCustNum(custPayVO.getCustNum());
orderTakeAndroidVO.setCustName(custPayVO.getCustName());
orderTakeAndroidVO.setMobile(custPayVO.getMobile());
orderTakeAndroidVO.setOrgFullName(custPayVO.getOrgFullName());
// orderTakeAndroidVO.setOrgFullName(custPayVO.getOrgFullName());
orderTakeAndroidVO.setCustPhotoUrl(custPayVO.getCustPhotoUrl());
orderTakeAndroidVO.setWalletBal(accInfoDetail.getWalletBal() != null ? accInfoDetail.getWalletBal().intValue() : 0);
orderTakeAndroidVO.setSubsidyBal(accInfoDetail.getSubsidyBal() != null ? accInfoDetail.getSubsidyBal().intValue() : 0);

View File

@ -430,4 +430,8 @@ public class OrderSearchParam implements OrderQueryParam {
this.roomSearchInfo = roomSearchInfo;
}
public String toString() {
Long var10000 = this.getCustId();
return "OrderSearchParam(custId=" + var10000 + ", macOrderId=" + this.getMacOrderId() + ", orderDate=" + String.valueOf(this.getOrderDate()) + ", startDate=" + String.valueOf(this.getStartDate()) + ", endDate=" + String.valueOf(this.getEndDate()) + ", ifCoupon=" + this.getIfCoupon() + ", ifOnline=" + this.getIfOnline() + ", nuClearMode=" + this.getNuClearMode() + ", commentState=" + this.getCommentState() + ", existsRefund=" + this.getExistsRefund() + ", checkState=" + this.getCheckState() + ", mealCode=" + this.getMealCode() + ", tradeNo=" + this.getTradeNo() + ", serialNum=" + this.getSerialNum() + ", psnTypeList=" + String.valueOf(this.getPsnTypeList()) + ", orderTypeList=" + String.valueOf(this.getOrderTypeList()) + ", orderStateList=" + String.valueOf(this.getOrderStateList()) + ", mealtimeTypeList=" + String.valueOf(this.getMealtimeTypeList()) + ", payStateList=" + String.valueOf(this.getPayStateList()) + ", orderRefundStateList=" + String.valueOf(this.getOrderRefundStateList()) + ", payTypeList=" + String.valueOf(this.getPayTypeList()) + ", deliveryTypeList=" + String.valueOf(this.getDeliveryTypeList()) + ", sourceTypeList=" + String.valueOf(this.getSourceTypeList()) + ", dishesStateList=" + String.valueOf(this.getDishesStateList()) + ", orderIdList=" + String.valueOf(this.getOrderIdList()) + ", machineSnList=" + String.valueOf(this.getMachineSnList()) + ", detailMachineSnList=" + String.valueOf(this.getDetailMachineSnList()) + ", accExceptionRecordStateList=" + String.valueOf(this.getAccExceptionRecordStateList()) + ", orgIdList=" + String.valueOf(this.getOrgIdList()) + ", areaIdList=" + String.valueOf(this.getAreaIdList()) + ", canteenIdList=" + String.valueOf(this.getCanteenIdList()) + ", stallIdList=" + String.valueOf(this.getStallIdList()) + ", roomIdList=" + String.valueOf(this.getRoomIdList()) + ", operatorIdList=" + String.valueOf(this.getOperatorIdList()) + ", cashierIdList=" + String.valueOf(this.getCashierIdList()) + ", deliveryRelatedIdList=" + String.valueOf(this.getDeliveryRelatedIdList()) + ", custSearchInfo=" + this.getCustSearchInfo() + ", goodsSearchInfo=" + this.getGoodsSearchInfo() + ", buffetSearchInfo=" + this.getBuffetSearchInfo() + ", deviceSearchInfo=" + this.getDeviceSearchInfo() + ", canteenSearchInfo=" + this.getCanteenSearchInfo() + ", orderSearchInfo=" + this.getOrderSearchInfo() + ", orderIdSearchInfo=" + this.getOrderIdSearchInfo() + ", roomSearchInfo=" + this.getRoomSearchInfo() + ")";
}
}

View File

@ -205,8 +205,8 @@ public class OrderInfo {
if (custPayVO != null) {
this.custId = custPayVO.getCustId();
this.orgId = custPayVO.getOrgId();
this.orgNum = custPayVO.getOrgNum();
this.orgFullName = custPayVO.getOrgFullName();
// this.orgNum = custPayVO.getOrgNum();
// this.orgFullName = custPayVO.getOrgFullName();
this.psnType = custPayVO.getPsnType();
this.psnTypeName = custPayVO.getPsnTypeName();
}

View File

@ -52,11 +52,11 @@ public class OrderPreBookVO {
order = 3
)
private String mobile;
@ExcelProperty(
value = {"组织名称"},
order = 4
)
private String orgFullName;
// @ExcelProperty(
// value = {"组织名称"},
// order = 4
// )
// private String orgFullName;
@ExcelIgnore
private String custPhotoUrl;
@ExcelIgnore
@ -112,9 +112,9 @@ public class OrderPreBookVO {
return this.mobile;
}
public String getOrgFullName() {
return this.orgFullName;
}
// public String getOrgFullName() {
// return this.orgFullName;
// }
public Integer getPsnType() {
return this.psnType;
@ -168,9 +168,9 @@ public class OrderPreBookVO {
this.mobile = mobile;
}
public void setOrgFullName(final String orgFullName) {
this.orgFullName = orgFullName;
}
// public void setOrgFullName(final String orgFullName) {
// this.orgFullName = orgFullName;
// }
public void setCustPhotoUrl(final String custPhotoUrl) {
this.custPhotoUrl = custPhotoUrl;

View File

@ -194,7 +194,7 @@ public class MacOrdBusinessImpl implements MacOrdBusiness {
CustPayVO custInfo = this.orderModuleClient.custPayInfoQuery(CustPayInfoQueryParam.ofCustId(macOrdParam.getCustId()));
if (ObjectUtil.isNotNull(custInfo)) {
reserveMacVO.setCustName(custInfo.getCustName());
reserveMacVO.setOrgFullName(custInfo.getOrgFullName());
// reserveMacVO.setOrgFullName(custInfo.getOrgFullName());
}
return reserveMacVO;
@ -216,7 +216,7 @@ public class MacOrdBusinessImpl implements MacOrdBusiness {
MacQueryOrdByMacOrdIdVO macOrdVO = new MacQueryOrdByMacOrdIdVO();
macOrdVO.setCustName(custInfo.getCustName());
macOrdVO.setCustNum(custInfo.getCustNum());
macOrdVO.setOrgFullName(custInfo.getOrgFullName());
// macOrdVO.setOrgFullName(custInfo.getOrgFullName());
macOrdVO.setCustPhotoUrl(custInfo.getCustPhotoUrl());
macOrdVO.setWalletBal(accInfoDetail.getWalletBal().intValue());
macOrdVO.setSubsidyBal(accInfoDetail.getSubsidyBal().intValue());

View File

@ -28,8 +28,8 @@ public class MacMarketOrdInfoVO {
@LeNiuDecryptField(HandleType.DESENSITIZE_MOBILE_PHONE)
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("机构全称")
private String orgFullName;
// @ApiModelProperty("机构全称")
// private String orgFullName;
@ApiModelProperty("订单日期(区别于下单时间)")
@ExcelProperty(
value = {"订单日期"},
@ -78,9 +78,9 @@ public class MacMarketOrdInfoVO {
return this.mobile;
}
public String getOrgFullName() {
return this.orgFullName;
}
// public String getOrgFullName() {
// return this.orgFullName;
// }
public LocalDate getOrdGoodsDate() {
return this.ordGoodsDate;
@ -138,9 +138,9 @@ public class MacMarketOrdInfoVO {
this.mobile = mobile;
}
public void setOrgFullName(final String orgFullName) {
this.orgFullName = orgFullName;
}
// public void setOrgFullName(final String orgFullName) {
// this.orgFullName = orgFullName;
// }
public void setOrdGoodsDate(final LocalDate ordGoodsDate) {
this.ordGoodsDate = ordGoodsDate;

View File

@ -160,15 +160,15 @@ public class UnifyPayDTO {
public void fillCustInfo(CustPayVO custPayVO) {
if (custPayVO != null) {
this.custId = custPayVO.getCustId();
this.custThirdId = custPayVO.getCustThirdId();
// this.custThirdId = custPayVO.getCustThirdId();
this.custName = custPayVO.getCustName();
this.custNum = custPayVO.getCustNum();
this.psnType = custPayVO.getPsnType();
this.psnTypeName = custPayVO.getPsnTypeName();
this.mobile = custPayVO.getMobile();
this.orgId = custPayVO.getOrgId();
this.orgNum = custPayVO.getOrgNum();
this.orgFullName = custPayVO.getOrgFullName();
// this.orgNum = custPayVO.getOrgNum();
// this.orgFullName = custPayVO.getOrgFullName();
this.custPhotoUrl = custPayVO.getCustPhotoUrl();
this.serialNum = custPayVO.getSerialNum();
this.thirdSerialNum = custPayVO.getThirdSerialNum();
@ -179,15 +179,15 @@ public class UnifyPayDTO {
public void fillCustInfo(CustInfo custInfo) {
if (custInfo != null) {
this.custId = custInfo.getCustId();
this.custThirdId = custInfo.getCustThirdId();
// this.custThirdId = custInfo.getCustThirdId();
this.custName = custInfo.getCustName();
this.custNum = custInfo.getCustNum();
this.psnType = custInfo.getPsnType();
this.psnTypeName = custInfo.getPsnTypeName();
this.mobile = custInfo.getMobile();
this.orgId = custInfo.getOrgId();
this.orgNum = custInfo.getOrgNum();
this.orgFullName = custInfo.getOrgFullName();
// this.orgNum = custInfo.getOrgNum();
// this.orgFullName = custInfo.getOrgFullName();
this.custPhotoUrl = custInfo.getCustPhotoUrl();
}
}

View File

@ -37,9 +37,9 @@ public class PayChannelSelectDTO {
thirdPaySupportDTO.setCustId(custPayVO.getCustId());
}
if (CharSequenceUtil.isBlank(thirdPaySupportDTO.getCustThirdId())) {
thirdPaySupportDTO.setCustThirdId(custPayVO.getCustThirdId());
}
// if (CharSequenceUtil.isBlank(thirdPaySupportDTO.getCustThirdId())) {
// thirdPaySupportDTO.setCustThirdId(custPayVO.getCustThirdId());
// }
if (CharSequenceUtil.isBlank(thirdPaySupportDTO.getCustNum())) {
thirdPaySupportDTO.setCustNum(custPayVO.getCustNum());

View File

@ -8,7 +8,7 @@
SELECT
bc.complaint_id,
bc.cust_id,
ci.cust_name,
ci.nick_name as cust_name,
bc.content,
bc.complaint_picture,
bc.mobile,
@ -18,7 +18,7 @@
ac.canteen_name
FROM
basics_complaint bc
LEFT JOIN cust_info ci ON ci.cust_id = bc.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = bc.cust_id
LEFT JOIN alloc_canteen ac ON ac.canteen_id = bc.canteen_id
WHERE
bc.cust_id = #{custId}

View File

@ -5,7 +5,7 @@
<!-- 分页查询食堂列表 -->
<select id="pageCanteen" resultType="com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenVO">
SELECT
t1.canteen_id, t1.canteen_num, t1.canteen_name, t1.cust_id, t4.cust_name, t1.eff_id, t1.contact_tel, t1.business_state, t1.main_project,
t1.canteen_id, t1.canteen_num, t1.canteen_name, t1.cust_id, t4.nick_name as cust_name, t1.eff_id, t1.contact_tel, t1.business_state, t1.main_project,
t1.start_business_time, t1.end_business_time, t1.img_url, t1.capacity, t1.if_book, t1.if_reserve, t1.crtime, t1.uptime, t1.pay_code_url,
t1.special_flag, t2.area_id, t2.areaNameStr, t3.labelNameStr
FROM
@ -24,7 +24,7 @@
GROUP BY canteen_id) t3
ON t1.canteen_id = t3.canteen_id
LEFT JOIN
cust_info t4 ON t1.cust_id = t4.cust_id
sys_user t4 ON t1.cust_id = t4.cust_id
WHERE
t1.if_del = 2
AND t1.canteen_type = #{param.canteenType,jdbcType=TINYINT}

View File

@ -4,7 +4,7 @@
<!-- 分页查询档口列表 -->
<select id="pageStall" resultType="com.bonus.canteen.core.allocation.canteen.vo.AllocStallVO">
SELECT
t1.stall_id, t1.stall_num, t1.stall_name, t5.cust_name, t1.contact_tel,
t1.stall_id, t1.stall_num, t1.stall_name, t5.nick_name as cust_name, t1.contact_tel,
t1.business_state, t1.start_business_time, t1.end_business_time, t1.if_use_call_num,
t1.on_line_meal_code_prefix, t1.off_line_meal_code_prefix,
t1.img_url, t1.if_book, t1.if_reserve, t1.crtime, t1.uptime, t1.pay_code_url,
@ -28,7 +28,7 @@
GROUP BY stall_id) t4
ON t1.stall_id = t4.stall_id
LEFT JOIN
cust_info t5 ON t1.cust_id = t5.cust_id
sys_user t5 ON t1.cust_id = t5.cust_id
INNER JOIN
alloc_area t6 ON t2.area_id = t6.area_id
WHERE

View File

@ -7,12 +7,12 @@
SELECT
t1.meal_line_id, t1.meal_line_num, t1.meal_line_name, t1.img_url, t1.meal_line_type, t1.area_id,
t1.canteen_id, t1.stall_id, t1.cust_id, t1.contact_tel,
t4.cust_name, t2.canteen_name, t3.stall_name, t5.area_name
t4.nick_name as cust_name, t2.canteen_name, t3.stall_name, t5.area_name
FROM
alloc_meal_line t1
INNER JOIN alloc_canteen t2 ON t1.canteen_id = t2.canteen_id
INNER JOIN alloc_stall t3 ON t1.stall_id = t3.stall_id
LEFT JOIN cust_info t4 ON t1.cust_id = t4.cust_id
LEFT JOIN sys_user t4 ON t1.cust_id = t4.cust_id
INNER JOIN alloc_area t5 ON t2.area_id = t5.area_id
WHERE
t1.if_del = #{param.ifDel}

View File

@ -123,14 +123,14 @@
<!-- 查询指定角色所有用户信息 -->
<select id="selectAllUserByRoleCode" resultType="com.bonus.canteen.core.auth.role.vo.MgrRoleUserVO">
SELECT mu.user_id userId,
mu.username,
mu.real_name realName
FROM mgr_user mu
LEFT JOIN cust_info ci ON mu.cust_id = ci.cust_id
mu.user_name username,
mu.nick_name realName
FROM sys_user mu
LEFT JOIN sys_user ci ON mu.cust_id = ci.cust_id
where mu.del_flag = #{delFlag}
<if test="roleCode != null and roleCode != ''">
AND ci.job = #{roleCode}
</if>
<!-- <if test="roleCode != null and roleCode != ''">-->
<!-- AND ci.job = #{roleCode}-->
<!-- </if>-->
</select>

View File

@ -32,9 +32,9 @@
parameterType="com.bonus.common.houqin.domain.CustCasual">
select *
from cust_casual t1
left join cust_info t2 on t1.cust_id = t2.cust_id
left join sys_user t2 on t1.cust_id = t2.cust_id
where
t2.cust_state = 1
t2.status = 0
<if test="custCasual.casualName != null and custCasual.casualName != ''">
and t1.casual_name = #{custCasual.casualName,jdbcType=VARCHAR}
</if>

View File

@ -2,22 +2,46 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.bonus.canteen.core.customer.mapper.CustInfoMapper">
<!--根据人员id集合获取人员信息-->
<!-- <select id="selectOne" resultType="com.bonus.canteen.core.customer.model.CustInfo">-->
<!-- select cust_id, cust_name, cust_num, cust_photo_url, mobile, pwd-->
<!-- from cust_info-->
<!-- <where>-->
<!-- cust_state = 1-->
<!-- <if test="custId != null">-->
<!-- and cust_id = #{custId}-->
<!-- </if>-->
<!-- <if test="custName != null and custName != ''">-->
<!-- and cust_name = #{custName}-->
<!-- </if>-->
<!-- <if test="custNum != null and custNum != ''">-->
<!-- and cust_num = #{custNum}-->
<!-- </if>-->
<!-- <if test="mobile != null and mobile != ''">-->
<!-- and mobile = #{mobile}-->
<!-- </if>-->
<!-- <if test="idCard != null and idCard != ''">-->
<!-- and id_card = #{idCard}-->
<!-- </if>-->
<!-- </where>-->
<!-- </select>-->
<select id="selectOne" resultType="com.bonus.canteen.core.customer.model.CustInfo">
select cust_id, cust_name, cust_num, cust_photo_url, mobile, pwd
from cust_info
select cust_id, nick_name as cust_name, cust_num, face_url as cust_photo_url,
phonenumber as mobile, password as pwd
from sys_user
<where>
cust_state = 1
<if test="custId != null">
and cust_id = #{custId}
</if>
<if test="custName != null and custName != ''">
and cust_name = #{custName}
and nick_name = #{custName}
</if>
<if test="custNum != null and custNum != ''">
and cust_num = #{custNum}
</if>
<if test="mobile != null and mobile != ''">
and mobile = #{mobile}
and phonenumber = #{mobile}
</if>
<if test="idCard != null and idCard != ''">
and id_card = #{idCard}
@ -26,8 +50,8 @@
</select>
<update id="updateById">
update cust_info
set cust_name = #{custName}, cust_num = #{custNum}, mobile = #{mobile}, id_card = #{idCard}, pwd = #{pwd}
update sys_user
set nick_name = #{custName}, cust_num = #{custNum}, phonenumber = #{mobile}, id_card = #{idCard}, password = #{pwd}
where cust_id = #{custId}
</update>
@ -35,107 +59,108 @@
<sql id="detailInfo">
ci.cust_id,
ci.cust_num,
ci.cust_name,
ci.mobile,
ci.nick_name as cust_name,
ci.phonenumber as mobile,
ci.email,
ci.sex,
-- ci.age,
ci.id_card,
ci.birthday,
ci.cust_photo_url,
ci.org_id,
ci.cust_third_id,
ci.org_num,
ci.org_full_name,
ci.place_id,
place.place_num,
place.place_full_name,
ci.face_url as cust_photo_url,
ci.dept_id as org_id,
# ci.cust_third_id,
# ci.org_num,
# ci.org_full_name,
# ci.place_id,
# place.place_num,
# place.place_full_name,
ci.psn_type,
ci.psn_type_name,
ci.home_addr,
ci.qq,
ci.wechat,
ci.company_wechat,
ci.dingtalk,
ci.emer_contact_person,
ci.emer_contact_num,
ci.emer_contact_card,
ci.job,
ci.job_rank,
ci.job_level,
ci.job_title,
ci.job_title_rank,
ci.auth_strength,
ci.entry_date,
ci.signing_date,
ci.expiry_date,
-- ci.cust_type,
ci.birthday,
cd.label_ids,
cd.label_names,
cd.taste_ids,
cd.taste_names,
ai.end_date accEndDate,
ci.doctor_num,
ci.hospital_num
# ci.qq,
# ci.wechat,
# ci.company_wechat,
# ci.dingtalk,
# ci.emer_contact_person,
# ci.emer_contact_num,
# ci.emer_contact_card,
# ci.job,
# ci.job_rank,
# ci.job_level,
# ci.job_title,
# ci.job_title_rank,
# ci.auth_strength,
# ci.entry_date,
# ci.signing_date,
# ci.expiry_date,
# ci.cust_type,
ci.birthday
# cd.label_ids,
# cd.label_names,
# cd.taste_ids,
# cd.taste_names,
# ai.end_date accEndDate,
# ci.doctor_num,
# ci.hospital_num
</sql>
<select id="queryCustInfoDetail" resultType="com.bonus.canteen.core.customer.vo.CustInfoVo">
select
<include refid="detailInfo"/>
,
ci.marital_status,
ci.cost_center_id,
A.name costCenterName,
ci.ethnicity_code,
ci.native_place,
ci.position,
ci.bank_card_num,
ci.head_portrait_url,
ci.extend_date,
ci.extend_date_time,
ci.extend_str1,
ci.extend_str2,
# ci.marital_status,
# ci.cost_center_id,
# A.name costCenterName,
# ci.ethnicity_code,
# ci.native_place,
# ci.position,
# ci.bank_card_num,
# ci.head_portrait_url,
# ci.extend_date,
# ci.extend_date_time,
# ci.extend_str1,
# ci.extend_str2,
cc.openid
from cust_info ci
from sys_user ci
left join cust_diet_like cd on ci.cust_id = cd.cust_id and cd.if_del = 2
left join acc_info ai on ci.cust_id = ai.cust_id
LEFT JOIN cust_place place ON ci.place_id = place.place_id
LEFT JOIN cust_cost_center A ON A.cost_center_id = ci.cost_center_id
# LEFT JOIN cust_place place ON ci.place_id = place.place_id
# LEFT JOIN cust_cost_center A ON A.cost_center_id = ci.cost_center_id
LEFT JOIN cust_casual cc on ci.cust_id = cc.cust_id
where ci.cust_id = #{info.custId}
and ci.cust_state = #{info.custState}
and ci.status = #{info.custState}
</select>
<!-- 查询用户详细信息 -->
<select id="queryCustInfo" resultType="com.bonus.canteen.core.customer.vo.CustInfoVo">
select ci.cust_limit_id,
select
# ci.cust_limit_id,
<if test="info.serialNum != null and info.serialNum != ''">
ac.serial_num,
ac.card_status,
</if>
ci.alipay_contract_num,
# ci.alipay_contract_num,
<include refid="detailInfo"/>
from cust_info ci
from sys_user ci
left join cust_diet_like cd on ci.cust_id = cd.cust_id and cd.if_del = 2
left join acc_info ai on ci.cust_id = ai.cust_id
<if test="info.serialNum != null and info.serialNum != ''">
left join acc_card ac on ci.cust_id = ac.cust_id and ac.card_status in(1,4)
</if>
LEFT JOIN cust_place place ON ci.place_id = place.place_id
# LEFT JOIN cust_place place ON ci.place_id = place.place_id
where 1 = 1
<if test="info.custId != null">
and ci.cust_id = #{info.custId}
</if>
<if test="info.custLimitId != null">
and ci.cust_limit_id = #{info.custLimitId}
</if>
<!-- <if test="info.custLimitId != null">-->
<!-- and ci.cust_limit_id = #{info.custLimitId}-->
<!-- </if>-->
<if test="info.serialNum != null and info.serialNum != ''">
and ac.serial_num = #{info.serialNum}
</if>
<if test="info.custState != null">
and ci.cust_state = #{info.custState}
and ci.status = #{info.custState}
</if>
</select>
@ -197,23 +222,23 @@
SELECT a.cust_id,
a.psn_type,
a.psn_type_name,
a.org_id,
a.org_num,
a.cust_third_id,
a.alipay_contract_num,
a.cust_state,
a.dept_id as org_id,
# a.org_num,
# a.cust_third_id,
# a.alipay_contract_num,
a.status as cust_state,
a.cust_num,
a.cust_name,
a.org_full_name,
a.cust_photo_url,
a.head_portrait_url,
a.mobile,
a.nick_name as cust_name,
# a.org_full_name,
a.face_url as cust_photo_url,
a.avatar as head_portrait_url,
a.phonenumber as mobile,
b.serial_num,
b.third_serial_num,
b.card_status,
b.validity_date
FROM
cust_info a
sys_user a
LEFT JOIN acc_card b ON b.cust_id = a.cust_id and b.card_status in (1, 4)
<if test="custPayDTO.openid != null and custPayDTO.openid != ''">
LEFT JOIN cust_casual c ON c.cust_id = a.cust_id
@ -246,23 +271,23 @@
where casual_id = #{casualId}
</update>
<select id="getCustomerNumByOrgIdList" resultType="com.bonus.canteen.core.customer.po.CustomerNumByOrgIdMapperPO">
SELECT
org_id,
COUNT(*) customerNum
FROM
cust_info
<where>
cust_state = 1
<if test="orgIdList != null and orgIdList.size() > 0">
AND org_id in
<foreach collection="orgIdList" item="orgId" separator="," open="(" close=")">
#{orgId}
</foreach>
</if>
</where>
GROUP BY org_id
</select>
<!-- <select id="getCustomerNumByOrgIdList" resultType="com.bonus.canteen.core.customer.po.CustomerNumByOrgIdMapperPO">-->
<!-- SELECT-->
<!-- org_id,-->
<!-- COUNT(*) customerNum-->
<!-- FROM-->
<!-- cust_info-->
<!-- <where>-->
<!-- cust_state = 1-->
<!-- <if test="orgIdList != null and orgIdList.size() > 0">-->
<!-- AND org_id in-->
<!-- <foreach collection="orgIdList" item="orgId" separator="," open="(" close=")">-->
<!-- #{orgId}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </where>-->
<!-- GROUP BY org_id-->
<!-- </select>-->
<!-- <select id="pageCustInfoPhoto" resultType="com.bonus.canteen.core.customer.vo.PageCustInfoPhotoVO"-->
<!-- parameterType="com.bonus.canteen.core.customer.dto.CustInfoParam">-->

View File

@ -7,12 +7,12 @@
dwfu.*,
ac.canteen_name,
ast.stall_name,
if(mu.real_name is null or mu.real_name = '', mu.username, mu.real_name) fetchUserName
if(mu.nick_name is null or mu.nick_name = '', mu.user_name, mu.nick_name) fetchUserName
from drp_warehouse_fetch_user dwfu
left join drp_warehouse dw on dwfu.warehouse_id = dw.warehouse_id
left join alloc_canteen ac on dwfu.canteen_id = ac.canteen_id
left join alloc_stall ast on dwfu.stall_id = ast.stall_id
left join mgr_user mu on dwfu.fetch_user_id = mu.user_id
left join sys_user mu on dwfu.fetch_user_id = mu.user_id
where dwfu.warehouse_id in
<foreach collection="warehouseIdList" item="warehouseId" open="(" close=")" separator=",">
#{warehouseId}

View File

@ -10,9 +10,9 @@
dw.warehouse_num ,
dw.warehouse_name ,
dw.user_id ,
mu.username,
mu.real_name ,
mu.phone,
mu.user_name as username,
mu.nick_name as real_name ,
mu.phonenumber as phone,
dw.region_province,
dw.region_city,
dw.region_district,
@ -31,14 +31,14 @@
dw.canteen_id,
ac.canteen_name,
dw.fetch_user_id,
if(mu2.real_name is null or mu2.real_name = '', mu2.username, mu2.real_name) fetchUserName
if(mu2.nick_name is null or mu2.nick_name = '', mu2.user_name, mu2.nick_name) fetchUserName
from
drp_warehouse dw
left join mgr_user mu on mu.user_id = dw.user_id
left join sys_user mu on mu.user_id = dw.user_id
left join drp_warehouse_type dwt on dwt.type_id = dw.type_id
left join alloc_area aa on aa.area_id = dw.area_id
left join alloc_canteen ac on ac.canteen_id = dw.canteen_id
left join mgr_user mu2 on mu2.user_id = dw.fetch_user_id
left join sys_user mu2 on mu2.user_id = dw.fetch_user_id
where
dw.del_flag = #{delFlag}
<if test="content.warehouseName != null and content.warehouseName != ''">
@ -48,7 +48,7 @@
and dw.warehouse_type like #{content.warehouseType}
</if>
<if test="content.realName != null and content.realName != ''">
and mu.real_name = #{content.realName,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
and mu.nick_name = #{content.realName,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
</if>
<if test="content.status != null ">
and dw.status = #{content.status}
@ -102,11 +102,11 @@
a.warehouse_num,
a.address,
a.fetch_user_id,
IF( mu.real_name IS NULL OR mu.real_name = '', mu.username, mu.real_name ) fetchUserName
IF( mu.nick_name IS NULL OR mu.nick_name = '', mu.user_name, mu.nick_name ) fetchUserName
FROM
drp_warehouse a
left join alloc_area aa on aa.area_id = a.area_id
LEFT JOIN mgr_user mu ON a.fetch_user_id = mu.user_id
LEFT JOIN sys_user mu ON a.fetch_user_id = mu.user_id
WHERE
a.del_flag = #{delFlag}
and a.status = #{status}

View File

@ -19,7 +19,7 @@
from
menu_collection_dishes mcd
left join alloc_stall ass on mcd.shopstall_id = ass.stall_id
left join cust_info ci on mcd.cust_id = ci.cust_id
left join sys_user ci on mcd.cust_id = ci.cust_id
left join menu_dishes md on mcd.dishes_id = md.base_dishes_id
left join menu_dishes_base mdb on md.base_dishes_id = mdb.base_dishes_id
left join menu_dishes_sale_record mdsr on md.dishes_id = mdsr.dishes_id

View File

@ -6,8 +6,8 @@
<!-- 分页获取指定餐品的评价列表 -->
<select id="selectAllListByMeal" resultType="com.bonus.canteen.core.menu.vo.MenuEvaluaOrderPageMealVO">
select
ci.cust_photo_url,
ci.cust_name,
ci.face_url as cust_photo_url,
ci.nick_name as cust_name,
meo.evalua_id,
meo.ord_id,
med.star_level,
@ -20,7 +20,7 @@
left join menu_dishes md on med.meal_id = md.dishes_id
left join menu_evalua_order meo on med.evalua_id = meo.evalua_id
left join order_info oai on meo.ord_id = oai.order_id
left join cust_info ci on oai.cust_id = ci.cust_id
left join sys_user ci on oai.cust_id = ci.cust_id
left join menu_evalua_picture mep on meo.evalua_id = mep.evalua_id
left join menu_material mm on mm.material_id=med.meal_id
where
@ -32,8 +32,8 @@
and meo.crtime between date_sub(now(), interval 30 day) and now()
</if>
group by
ci.cust_photo_url,
ci.cust_name,
ci.face_url,
ci.nick_name,
meo.evalua_id,
meo.ord_id,
med.star_level,
@ -74,7 +74,7 @@
select
meo.evalua_id,
oai.order_id as ord_id,
ci.cust_name,
ci.nick_name as cust_name,
oai.canteen_name,
oai.stall_name,
oai.mealtime_name,
@ -87,7 +87,7 @@
from
menu_evalua_order meo
left join order_info oai on meo.ord_id = oai.order_id
left join cust_info ci on oai.cust_id = ci.cust_id
left join sys_user ci on oai.cust_id = ci.cust_id
LEFT JOIN alloc_canteen ac ON ac.canteen_id = oai.canteen_id
LEFT JOIN alloc_area ar ON ar.area_id = ac.area_id
where
@ -102,7 +102,7 @@
and #{content.endTime} >= meo.crtime
</if>
<if test="content.keyword != null and content.keyword != ''">
and (ci.cust_name like #{content.keyword} or meo.ord_id like #{content.keyword})
and (ci.nick_name like #{content.keyword} or meo.ord_id like #{content.keyword})
</if>
<if test="content.canteenIdList != null and content.canteenIdList.size() > 0">
AND oai.canteen_id IN

View File

@ -199,9 +199,9 @@
</resultMap>
<select id="selectOrgAndPsnByCustLimitId" parameterType="com.bonus.canteen.core.customer.model.CustInfo" resultType="com.bonus.canteen.core.customer.model.CustInfo">
select org_id, psn_type
from cust_info
where cust_id = #{custId} and cust_state = 1
select dept_id as org_id, psn_type
from sys_user
where cust_id = #{custId} and status = 0
</select>
<!-- 获取指定类型的生效范围详情 -->

View File

@ -6,11 +6,11 @@
<select id="getSimpleInfo" resultType="com.bonus.canteen.core.nutrition.common.vo.HealthInfoSimpleVo">
SELECT a.cust_id,
a.cust_num,
a.cust_name,
a.org_full_name,
cp.place_full_name,
a.mobile,
a.cust_photo_url,
a.nick_name as cust_name,
# a.org_full_name,
# cp.place_full_name,
a.phonenumber as mobile,
a.face_url as cust_photo_url,
a.birthday,
a.sex,
d.height,
@ -22,8 +22,8 @@
b.pregnant_status,
GROUP_CONCAT(c.chronic_name ORDER BY c.chronic_id desc) AS chronic_names,
GROUP_CONCAT(c.chronic_id ORDER BY c.chronic_id desc) AS chronic_ids
from cust_info a
left join cust_place cp on a.place_id = cp.place_id
from sys_user a
# left join cust_place cp on a.place_id = cp.place_id
left join health_info b on a.cust_id = b.cust_id
left join health_info_chronic c on a.cust_id = c.cust_id
left join health_body_record d on a.cust_id = d.cust_id and d.if_latest = 1
@ -31,11 +31,11 @@
and a.cust_id = #{custId}
group by a.cust_id,
a.cust_num,
a.cust_name,
a.org_full_name,
cp.place_full_name,
a.mobile,
a.cust_photo_url,
a.nick_name,
# a.org_full_name,
# cp.place_full_name,
a.phonenumber,
a.face_url,
a.birthday,
a.sex,
d.height,

View File

@ -104,9 +104,9 @@
<select id="queryWeighBindDetail" resultType="com.bonus.canteen.core.order.deprecated.vo.AppPageOrdListVO">
SELECT A.*,A.resress_picurl as resressPicurl,
A.if_redress as checkState , A.redress_remarks as remark ,A.crtime as bindTime,
E.cust_name,E.mobile
E.nick_name as cust_name,E.phonenumber as mobile
FROM mac_weigh_bind A LEFT JOIN mac_machine B ON A.machine_sn = B.machine_sn
LEFT JOIN cust_info E ON A.cust_id = E.cust_id
LEFT JOIN sys_user E ON A.cust_id = E.cust_id
WHERE A.bind_state = 1
<if test="openId != null and openId != ''">
AND A.openid = #{openId}

View File

@ -90,11 +90,15 @@
<select id="queryPageOrdInfoDetail" resultMap="ordInfoDetailMap"
parameterType="com.bonus.canteen.core.order.deprecated.param.OrdParam">
select
oai.*,ci.cust_num custNum,ci.cust_name custName,
ci.org_full_name orgFullName,ci.psn_type psnType, cp.psn_type_name psnTypeName
oai.*,
ci.cust_num custNum,
ci.nick_name custName,
# ci.org_full_name orgFullName,
ci.psn_type psnType,
cp.psn_type_name psnTypeName
from order_info oai
left join cust_info ci on ci.cust_id = oai.cust_id
left join sys_user ci on ci.cust_id = oai.cust_id
left join acc_card ac on ac.cust_id = oai.cust_id and ac.card_status in (1,4)
left join cust_psn_type cp on cp.psn_type = ci.psn_type
<where>
@ -112,7 +116,7 @@
</foreach>
</if>
<if test="ordParam.orgIdList != null and ordParam.orgIdList.size() > 0">
and ci.org_id in
and ci.dept_id in
<foreach collection="ordParam.orgIdList" item="orgId" separator="," open="(" close=")">
#{orgId}
</foreach>
@ -125,17 +129,17 @@
and ci.cust_num = #{ordParam.custNum}
</if>
<if test="ordParam.custName != null and ordParam.custName != ''">
and ci.cust_name like #{ordParam.custName}
and ci.nick_name like #{ordParam.custName}
</if>
<if test="ordParam.mobile != null">
and ci.cust_name = #{ordParam.mobile,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
and ci.phonenumber = #{ordParam.mobile,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
</if>
<if test="ordParam.keywords != null and ordParam.keywords != ''">
and (
ci.cust_name = #{ordParam.keywords,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
ci.nick_name = #{ordParam.keywords,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
OR ci.cust_num = #{ordParam.keywords,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile = #{ordParam.keywords,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{ordParam.keywords,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{ordParam.keywords,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{ordParam.keywords,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
)
</if>
<if test="ordParam.psnTypeList != null and ordParam.psnTypeList.size() > 0">
@ -249,7 +253,7 @@
AND it2.role_code = #{authPO.roleCode}
AND it1.half_select = 1
AND it3.user_id = #{authPO.userId}
AND ci.org_id = it1.org_id
AND ci.dept_id = it1.org_id
)
</if>
<if test="'3'.toString() == authPO.roleType.toString()">
@ -279,12 +283,12 @@
t1.order_state as ordState,
t1.order_refund_state as ordRefundState,
t1.dishes_state,
t2.cust_name ,
t2.cust_num ,
t2.mobile ,
t2.org_full_name
t2.nick_name as cust_name,
t2.cust_num,
t2.phonenumber as mobile
# t2.org_full_name
FROM order_info t1
LEFT JOIN cust_info t2 ON t1.cust_id = t2.cust_id
LEFT JOIN sys_user t2 ON t1.cust_id = t2.cust_id
<where>
t1.order_type in(4, 5)
<if test="marketOrdDTO.ordId != null">
@ -297,7 +301,7 @@
AND t1.order_date BETWEEN #{marketOrdDTO.startDate} AND #{marketOrdDTO.endDate}
</if>
<if test="marketOrdDTO.mixCondition != null and marketOrdDTO.mixCondition != '' ">
AND concat(t2.cust_num,t2.cust_name,t2.mobile) LIKE concat('%', #{marketOrdDTO.mixCondition},'%')
AND concat(t2.cust_num,t2.nick_name,t2.phonenumber) LIKE concat('%', #{marketOrdDTO.mixCondition},'%')
</if>
</where>
order by t1.order_date desc,t1.order_time desc
@ -316,13 +320,12 @@
t1.order_time as ordTime,
t1.order_date as ordGoodsDate,
2 as ifWriteOff,
t2.cust_name,
t2.nick_name as cust_name,
t2.cust_num,
t2.mobile,
t2.org_full_name
t2.phonenumber as mobile
# t2.org_full_name
FROM order_info t1
LEFT JOIN cust_info t2 ON t1.cust_id = t2.cust_id
LEFT JOIN sys_user t2 ON t1.cust_id = t2.cust_id
WHERE
t1.order_type in (4 ,5)
AND t1.dishes_state = 3
@ -352,7 +355,7 @@
oi.pay_state AS payState,
oi.order_state,
oi.order_refund_state AS orderRefundState,
ci.cust_name AS custName,
ci.nick_name AS custName,
oi.stall_id AS shopstallId,
oi.stall_name AS shopstallName,
oi.meal_code AS shopstallCallNum,
@ -361,7 +364,7 @@
oi.order_date AS ordGoodsDate,
oi.dishes_state
FROM order_info oi
LEFT JOIN cust_info ci ON oi.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON oi.cust_id = ci.cust_id
WHERE
oi.order_date = #{localdate}
AND oi.order_refund_state IN (1, 3)
@ -398,7 +401,7 @@
oi.pay_state AS payState,
oi.order_state,
oi.order_refund_state AS orderRefundState,
ci.cust_name AS custName,
ci.nick_name AS custName,
oi.stall_id AS shopstallId,
oi.stall_name AS shopstallName,
oi.meal_code AS shopstallCallNum,
@ -407,7 +410,7 @@
oi.order_date AS ordGoodsDate,
oi.dishes_state
FROM order_info oi
LEFT JOIN cust_info ci ON oi.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON oi.cust_id = ci.cust_id
WHERE
oi.order_date >= #{localdate}
AND oi.order_refund_state IN (1, 3)
@ -464,7 +467,7 @@
oi.pay_state AS payState,
oi.order_state,
oi.order_refund_state AS orderRefundState,
ci.cust_name AS custName,
ci.nick_name AS custName,
oi.stall_id AS shopstallId,
oi.stall_name AS shopstallName,
oi.meal_code AS shopstallCallNum,
@ -473,7 +476,7 @@
oi.order_date AS ordGoodsDate,
oi.real_amount AS realAmount
FROM order_info oi
LEFT JOIN cust_info ci ON oi.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON oi.cust_id = ci.cust_id
WHERE
oi.order_date = #{orderDate}
<if test="ordRefundQueryDTO.custId != null">
@ -526,12 +529,12 @@
oi.dishes_state AS dishesState,
oi.remark,
ci.cust_num AS custNum,
ci.cust_name AS custName,
ci.org_full_name AS orgFullName,
ci.nick_name AS custName,
# ci.org_full_name AS orgFullName,
ci.psn_type AS psnType,
ci.psn_type_name AS psnTypeName
FROM order_info oi
LEFT JOIN cust_info ci ON ci.cust_id = oi.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = oi.cust_id
<if test="ordMachineParam.serialNum != null and ordMachineParam.serialNum != ''">
LEFT JOIN acc_card ac ON ci.cust_id = ac.cust_id and ac.card_status in (1,4)
</if>

View File

@ -39,11 +39,11 @@
<select id="listVoByIds" resultType="com.bonus.canteen.core.order.common.vo.OrderInfoVO">
SELECT oi.cust_id,
ci.cust_name,
ci.nick_name as cust_name,
ci.cust_num,
ci.mobile,
ci.phonenumber as mobile,
oi.org_full_name,
ci.cust_photo_url,
ci.face_url as cust_photo_url,
oi.psn_type,
oi.psn_type_name,
oi.order_type,
@ -90,7 +90,7 @@
odr.delivery_name,
odr.delivery_mobile
FROM order_info oi
LEFT JOIN cust_info ci ON oi.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON oi.cust_id = ci.cust_id
LEFT JOIN order_delivery odr ON oi.order_id = odr.order_id AND oi.order_date = odr.order_date
WHERE oi.order_id IN
<foreach collection="orderIds" item="item" open="(" close=")" separator=",">
@ -247,14 +247,14 @@
</if>
<if test="param.custSearchInfo != null and param.custSearchInfo != ''">
AND EXISTS(
SELECT 1 FROM cust_info ci
SELECT 1 FROM sys_user ci
WHERE oi.cust_id = ci.cust_id
AND (
ci.cust_name = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.cust_name_like LIKE CONCAT('%',#{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
ci.nick_name = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.nick_name_like LIKE CONCAT('%',#{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
OR ci.cust_num = #{param.custSearchInfo}
OR ci.mobile = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
)
)
</if>
@ -268,14 +268,14 @@
<if test="param.buffetSearchInfo != null and param.buffetSearchInfo.trim() != ''">
AND (
EXISTS(
SELECT 1 FROM cust_info ci
SELECT 1 FROM sys_user ci
WHERE oi.cust_id = ci.cust_id
AND (
ci.cust_name = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.cust_name_like LIKE CONCAT('%',#{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
ci.nick_name = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.nick_name_like LIKE CONCAT('%',#{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
OR ci.cust_num = #{param.buffetSearchInfo}
OR ci.mobile = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
)
) OR EXISTS(
SELECT 1 FROM mac_plateid_bind_serial mpbs
@ -308,14 +308,14 @@
<if test="param.orderSearchInfo != null and param.orderSearchInfo != ''">
AND (
EXISTS(
SELECT 1 FROM cust_info ci
SELECT 1 FROM sys_user ci
WHERE oi.cust_id = ci.cust_id
AND (
ci.cust_name = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.cust_name_like LIKE CONCAT('%',#{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
ci.nick_name = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.nick_name_like LIKE CONCAT('%',#{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
OR ci.cust_num = #{param.buffetSearchInfo}
OR ci.mobile = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
)
) OR oi.order_id like concat('%', #{param.orderSearchInfo}, '%')
)
@ -323,14 +323,14 @@
<if test="param.roomSearchInfo != null and param.roomSearchInfo != ''">
AND (
EXISTS(
SELECT 1 FROM cust_info ci
SELECT 1 FROM sys_user ci
WHERE oi.cust_id = ci.cust_id
AND (
ci.cust_name = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.cust_name_like LIKE CONCAT('%',#{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
ci.nick_name = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.nick_name_like LIKE CONCAT('%',#{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
OR ci.cust_num = #{param.buffetSearchInfo}
OR ci.mobile = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
)
) OR oi.room_name like concat('%', #{param.roomSearchInfo}, '%')
)
@ -533,15 +533,15 @@
od.consignee_name = #{param.custSearchInfo}
OR od.consignee_mobile = #{param.custSearchInfo}
OR EXISTS(
SELECT 1 FROM cust_info ci
SELECT 1 FROM sys_user ci
WHERE oi.cust_id = ci.cust_id
<if test="param.custSearchInfo != null and param.custSearchInfo != ''">
AND (
ci.cust_name = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.cust_name_like LIKE CONCAT('%',#{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
ci.nick_name = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.nick_name_like LIKE CONCAT('%',#{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
OR ci.cust_num = #{param.custSearchInfo}
OR ci.mobile = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
)
</if>
)
@ -609,15 +609,15 @@
</if>
<if test="param.custSearchInfo != null and param.custSearchInfo != ''">
AND EXISTS(
SELECT 1 FROM cust_info ci
SELECT 1 FROM sys_user ci
WHERE oi.cust_id = ci.cust_id
<if test="param.custSearchInfo != null and param.custSearchInfo != ''">
AND (
ci.cust_name = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.cust_name_like LIKE CONCAT('%',#{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
ci.nick_name = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.nick_name_like LIKE CONCAT('%',#{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
OR ci.cust_num = #{param.custSearchInfo}
OR ci.mobile = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
)
</if>
)
@ -625,14 +625,14 @@
<if test="param.buffetSearchInfo != null and param.buffetSearchInfo.trim() != ''">
AND (
EXISTS(
SELECT 1 FROM cust_info ci
SELECT 1 FROM sys_user ci
WHERE oi.cust_id = ci.cust_id
AND (
ci.cust_name = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.cust_name_like LIKE CONCAT('%',#{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
ci.nick_name = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.nick_name_like LIKE CONCAT('%',#{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
OR ci.cust_num = #{param.buffetSearchInfo}
OR ci.mobile = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{param.buffetSearchInfo,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
)
) OR EXISTS(
SELECT 1 FROM mac_plateid_bind_serial mpbs
@ -654,9 +654,9 @@
<select id="queryOrderInfoWeb" resultType="com.bonus.canteen.core.order.web.vo.OrderListWebVO">
SELECT oi.cust_id,
ci.cust_name,
ci.nick_name as cust_name,
ci.cust_num,
ci.mobile,
ci.phonenumber as mobile,
oi.org_full_name,
oi.psn_type,
oi.psn_type_name,
@ -705,7 +705,7 @@
aa.area_name,
mc.coupon_name
FROM order_info oi
LEFT JOIN cust_info ci ON oi.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON oi.cust_id = ci.cust_id
LEFT JOIN mkt_coupon mc ON oi.coupon_id = mc.coupon_num
LEFT JOIN alloc_canteen ac ON oi.canteen_id = ac.canteen_id
LEFT JOIN alloc_area aa ON ac.area_id = aa.area_id
@ -731,10 +731,10 @@
aa.area_id, aa.area_name,
oi.real_amount, oi.org_full_name,
od.consignee_address , od.consignee_name , od.consignee_mobile , od.delivery_name , od.delivery_mobile, od.delivery_code,
mu.username AS operatorUserName, mu.real_name AS operatorRealName
mu.user_name AS operatorUserName, mu.nick_name AS operatorRealName
FROM order_delivery od
INNER JOIN order_info oi ON od.order_id = oi.order_id AND oi.order_date = od.order_date
LEFT JOIN mgr_user mu ON oi.operator_id = mu.user_id
LEFT JOIN sys_user mu ON oi.operator_id = mu.user_id
LEFT JOIN alloc_canteen ac ON oi.canteen_id = ac.canteen_id
LEFT JOIN alloc_area aa ON ac.area_id = aa.area_id
WHERE od.delivery_id IN
@ -894,8 +894,8 @@
t.flow_instance_id,
oi.cust_id AS custId,
ci.cust_num AS custNum,
ci.cust_name AS custName,
ci.mobile,
ci.nick_name AS custName,
ci.phonenumber as mobile,
oi.org_full_name AS orgFullName,
oi.order_id AS orderId,
oi.mac_order_id AS macOrderId,
@ -909,7 +909,7 @@
mpbs.plate_id AS plateNum
FROM order_refund t
INNER JOIN order_info oi ON t.order_id = oi.order_id
LEFT JOIN cust_info ci ON oi.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON oi.cust_id = ci.cust_id
LEFT JOIN mac_plateid_bind_serial mpbs ON oi.plate_serial_num = mpbs.plate_serial_num
WHERE t.order_refund_id IN
<foreach collection="orderRefundIds" item="item" open="(" close=")" separator=",">
@ -946,7 +946,7 @@
od.sales_mode,
oi.stall_name as shopstall_name,
oi.canteen_name,
u.username,
u.user_name as username,
cp.user_id,
aa.area_id,
aa.area_name
@ -954,7 +954,7 @@
INNER join order_info oi on o.order_id = oi.order_id AND oi.order_date = o.order_date
INNER JOIN order_detail od ON oi.order_id = od.order_id AND oi.order_date = od.order_date
LEFT JOIN cust_place cp ON o.delivery_related_id = cp.place_id
left join mgr_user u on u.user_id = cp.user_id
left join sys_user u on u.user_id = cp.user_id
LEFT JOIN alloc_canteen ac ON oi.canteen_id = ac.canteen_id
LEFT JOIN alloc_area aa ON ac.area_id = aa.area_id
WHERE od.detail_state in (1,3)
@ -970,7 +970,7 @@
</if>
GROUP BY oi.order_type,oi.order_date,oi.mealtime_type,oi.mealtime_name,
od.goods_dishes_id,od.goods_dishes_name,od.sales_mode,oi.stall_name,
oi.canteen_name, u.username,cp.user_id,aa.area_id,aa.area_name
oi.canteen_name, u.user_name,cp.user_id,aa.area_id,aa.area_name
ORDER BY oi.order_date desc, od.goods_dishes_id ASC
</select>
@ -1068,14 +1068,14 @@
oi.remark,
oi.if_online,
ci.cust_id,
ci.cust_name,
ci.nick_name as cust_name,
ci.cust_num,
ci.mobile,
ci.phonenumber as mobile,
oi.org_num,
oi.org_full_name,
mpbs.plate_id AS plateNum
FROM order_info oi
LEFT JOIN cust_info ci ON oi.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON oi.cust_id = ci.cust_id
LEFT JOIN mac_plateid_bind_serial mpbs ON oi.plate_serial_num = mpbs.plate_serial_num
WHERE oi.order_id IN
<foreach collection="orderIds" item="item" open="(" close=")" separator=",">

View File

@ -15,16 +15,16 @@
opb.crtime,
opb.upby,
opb.uptime,
ci.cust_name,
ci.nick_name as cust_name,
ci.cust_num,
ci.mobile,
ci.cust_type,
ci.org_full_name,
ci.cust_photo_url,
ci.phonenumber as mobile,
# ci.cust_type,
# ci.org_full_name,
ci.face_url as cust_photo_url,
ci.psn_type,
ci.psn_type_name
FROM order_pre_book opb
LEFT JOIN cust_info ci ON opb.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON opb.cust_id = ci.cust_id
WHERE 1 = 1
<if test="param.orderDate != null">
AND opb.order_date = #{param.orderDate}
@ -32,13 +32,13 @@
<if test="param.custSearchInfo != null and param.custSearchInfo != ''">
AND (
ci.cust_num = #{param.custSearchInfo}
OR ci.cust_name = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
OR ci.nick_name = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
OR ci.phonenumber = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
# OR ci.mobile_suffix = #{param.custSearchInfo,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}
)
</if>
<if test="param.orgIdList != null and param.orgIdList.size() > 0">
AND ci.org_id in
AND ci.dept_id in
<foreach collection="param.orgIdList" item="orgId" open="(" close=")" separator=",">
#{orgId}
</foreach>

View File

@ -1871,7 +1871,7 @@
d.order_id,
d.canteen_id,
d.stall_id,
ifnull(ci.org_id, 99999) AS org_id,
ifnull(ci.dept_id, 99999) AS org_id,
d.mealtime_type,
d.cust_id,
d.machine_sn,
@ -1913,7 +1913,7 @@
1
FROM
order_info d
LEFT JOIN cust_info ci ON d.cust_id = ci.cust_id
LEFT JOIN sys_user ci ON d.cust_id = ci.cust_id
LEFT JOIN (
SELECT hol_date,MIN(hol_type) AS hol_type FROM mkt_holiday GROUP BY hol_date
) a ON DATE_FORMAT(d.pay_time,'%Y-%m-%d') = DATE_FORMAT(a.hol_date,'%Y-%m-%d')

View File

@ -7,7 +7,7 @@
a.supermarket_id,
a.supermarket_name,
a.user_id,
b.real_name userName,
b.nick_name userName,
a.mobile,
a.warehouse_id,
c.warehouse_name,
@ -32,7 +32,7 @@
a.pay_code_url
FROM
supermarket_info a
LEFT JOIN mgr_user b ON a.user_id = b.user_id
LEFT JOIN sys_user b ON a.user_id = b.user_id
LEFT JOIN drp_warehouse c ON c.warehouse_id = a.warehouse_id
left join alloc_area d on d.area_id = a.area_id
<where>

View File

@ -19,7 +19,7 @@
and t2.cust_id = #{infoParam.custId}
</if>
<if test="infoParam.orgIdList != null and infoParam.orgIdList.size() > 0">
and t2.org_id in
and t2.dept_id in
<foreach collection="infoParam.orgIdList" item="orgId" separator="," open="(" close=")">
#{orgId}
</foreach>
@ -191,7 +191,7 @@
SUM( t4.redEnvelope ) AS redEnvelope,
SUM( t4.accFreezeBalTotal ) AS accFreezeBalTotal
FROM acc_info t1
INNER JOIN cust_info t2 ON t1.cust_id = t2.cust_id
INNER JOIN sys_user t2 ON t1.cust_id = t2.cust_id
LEFT JOIN
(
SELECT
@ -209,13 +209,13 @@
</include>
</select>
<select id="queryAccIdByParam" resultType="java.lang.Long">
SELECT t1.acc_id
FROM acc_info t1
LEFT JOIN cust_info t2 ON t1.cust_id = t2.cust_id
<include refid="queryPageAccInfoWhereSql">
</include>
</select>
<!-- <select id="queryAccIdByParam" resultType="java.lang.Long">-->
<!-- SELECT t1.acc_id-->
<!-- FROM acc_info t1-->
<!-- LEFT JOIN cust_info t2 ON t1.cust_id = t2.cust_id-->
<!-- <include refid="queryPageAccInfoWhereSql">-->
<!-- </include>-->
<!-- </select>-->
<update id="updateStateByOverdue">
UPDATE acc_info
@ -241,17 +241,17 @@
<select id="queryFrozenAccPage" resultType="com.bonus.canteen.core.account.v3.web.vo.AccExistFrozenListVO">
SELECT ai.cust_id,
t2.cust_num,
t2.cust_name,
t2.mobile,
t2.org_full_name,
t2.nick_name as cust_name,
t2.phonenumber as mobile,
# t2.org_full_name,
t2.psn_type,
cpt.psn_type_name
FROM acc_info ai
INNER JOIN cust_info t2 ON t2.cust_id = ai.cust_id
INNER JOIN sys_user t2 ON t2.cust_id = ai.cust_id
LEFT JOIN cust_psn_type cpt ON cpt.psn_type = t2.psn_type
<where>
<if test="infoParam.custState != null">
t2.cust_state = #{infoParam.custState}
t2.status = #{infoParam.custState}
</if>
<if test="infoParam.accStatus != null">
AND ai.acc_status = #{infoParam.accStatus}
@ -260,7 +260,7 @@
AND t2.psn_type = #{infoParam.psnType}
</if>
<if test="infoParam.orgIdList != null and infoParam.orgIdList.size() > 0">
and t2.org_id in
and t2.dept_id in
<foreach collection="infoParam.orgIdList" item="orgId" separator="," open="(" close=")">
#{orgId}
</foreach>
@ -292,15 +292,15 @@
SELECT
a.cust_id,
SUM(a.wallet_bal) accBalTotal,
MIN(t2.cust_name) AS custName,
MIN(t2.nick_name) AS custName,
MIN(t1.acc_id) AS accId
FROM
acc_wallet_info a
INNER JOIN acc_info t1 ON a.cust_id = t1.cust_id
INNER JOIN cust_info t2 ON a.cust_id = t2.cust_id
INNER JOIN sys_user t2 ON a.cust_id = t2.cust_id
WHERE
t1.acc_status = 1
AND t2.cust_state = 1
AND t2.status = 0
GROUP BY a.cust_id
ORDER BY a.cust_id
</select>
@ -311,19 +311,19 @@
SELECT t1.acc_id,
t2.cust_id,
t2.cust_num,
t2.cust_name,
t2.mobile,
t2.org_full_name,
t2.nick_name as cust_name,
t2.phonenumber as mobile,
# t2.org_full_name,
t2.psn_type,
t7.psn_type_name,
t1.acc_status,
t1.end_date
FROM cust_info t2
FROM sys_user t2
INNER JOIN acc_info t1 ON t1.cust_id = t2.cust_id
LEFT JOIN cust_psn_type t7 on t7.psn_type = t2.psn_type
<include refid="queryPageAccInfoWhereSql">
</include>
order by t2.id desc
order by t2.create_time desc
</select>
<!-- 通过人员id查询账户信息-->
<!-- <select id="getAccInfoOpenPOByCustId" resultType="com.bonus.canteen.core.account.v3.po.AccInfoOpenPO">-->
@ -421,25 +421,25 @@
ifnull(SUM( CASE WHEN acc_status = 2 THEN 1 ELSE 0 END ),0) AS deactivateCount,
ifnull(SUM( CASE WHEN acc_status = 4 THEN 1 ELSE 0 END ),0) AS expireCount
FROM acc_info ai
LEFT JOIN cust_info ci ON ci.cust_id = ai.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = ai.cust_id
WHERE ai.uptime <![CDATA[<=]]> #{param.endTime}
<include refid="query_acc_org_auth_sql"></include>
) a,
( SELECT count(*) AS startCount
FROM acc_info ai
LEFT JOIN cust_info ci ON ci.cust_id = ai.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = ai.cust_id
WHERE ai.crtime <![CDATA[<=]]> #{param.startTime}
<include refid="query_acc_org_auth_sql"></include>
) b,
( SELECT count(*) AS closedCount
FROM acc_info ai
LEFT JOIN cust_info ci ON ci.cust_id = ai.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = ai.cust_id
WHERE ai.acc_status = 3 and ai.uptime BETWEEN #{param.startTime} AND #{param.endTime}
<include refid="query_acc_org_auth_sql"></include>
) c,
( SELECT count(*) AS openCount
FROM acc_info ai
LEFT JOIN cust_info ci ON ci.cust_id = ai.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = ai.cust_id
WHERE ai.crtime BETWEEN #{param.startTime} AND #{param.endTime}
<include refid="query_acc_org_auth_sql"></include>
) d
@ -514,25 +514,25 @@
ifnull(SUM( CASE WHEN card_status = 1 THEN 1 ELSE 0 END ),0) AS normalCount,
ifnull(SUM( CASE WHEN card_status = 4 THEN 1 ELSE 0 END ),0) AS lossCount
FROM acc_card ac
LEFT JOIN cust_info ci ON ci.cust_id = ac.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = ac.cust_id
WHERE ac.uptime <![CDATA[<=]]> #{param.endTime}
<include refid="query_acc_org_auth_sql"></include>
) a,
( SELECT count(*) AS startCount
FROM acc_card ac
LEFT JOIN cust_info ci ON ci.cust_id = ac.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = ac.cust_id
WHERE ac.crtime <![CDATA[<=]]> #{param.startTime}
<include refid="query_acc_org_auth_sql"></include>
) b,
( SELECT count(*) AS intervalLossCount
FROM acc_card ac
LEFT JOIN cust_info ci ON ci.cust_id = ac.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = ac.cust_id
WHERE ac.card_status = 4 and ac.uptime BETWEEN #{param.startTime} AND #{param.endTime}
<include refid="query_acc_org_auth_sql"></include>
) c,
( SELECT count(*) AS intervalOpenCount
FROM acc_card ac
LEFT JOIN cust_info ci ON ci.cust_id = ac.cust_id
LEFT JOIN sys_user ci ON ci.cust_id = ac.cust_id
WHERE ac.crtime BETWEEN #{param.startTime} AND #{param.endTime}
<include refid="query_acc_org_auth_sql"></include>
) d
@ -597,7 +597,7 @@
<!-- 查询账户统计-组织权限sql-->
<sql id="query_acc_org_auth_sql">
<if test="'2'.toString() == authPO.roleType.toString()">
<if test="'1'.toString() != authPO.roleType.toString()">
and EXISTS (
SELECT null
FROM mgr_role_org it1
@ -607,7 +607,7 @@
AND it2.role_code = #{authPO.roleCode}
AND it1.half_select = 1
AND it3.user_id = #{authPO.userId}
AND it1.org_id = ci.org_id
AND it1.org_id = ci.dept_id
)
</if>
</sql>
@ -617,9 +617,9 @@
SELECT
t2.cust_id,
t2.cust_num,
t2.cust_name,
t2.mobile,
t2.org_full_name,
t2.nick_name as cust_name,
t2.phonenumber as mobile,
# t2.org_full_name,
t2.psn_type,
t5.psn_type_name,
t1.acc_status,
@ -633,7 +633,7 @@
t4.frozenSub,
t4.redEnvelope
FROM acc_info t1
LEFT JOIN cust_info t2 ON t1.cust_id = t2.cust_id
LEFT JOIN sys_user t2 ON t1.cust_id = t2.cust_id
LEFT JOIN
(
SELECT
@ -661,7 +661,7 @@
</foreach>
</if>
<if test="infoParam.orgIdList != null and infoParam.orgIdList.size() > 0">
and t2.org_id in
and t2.dept_id in
<foreach collection="infoParam.orgIdList" item="orgId" separator="," open="(" close=")">
#{orgId}
</foreach>
@ -670,7 +670,7 @@
<include refid="cust_fuzzy_query"></include>
</if>
</where>
ORDER BY t2.id desc
ORDER BY t2.create_time desc
</select>
@ -685,10 +685,10 @@
<!-- 关联用户模糊查询-->
<sql id="cust_fuzzy_query">
and (t2.cust_num LIKE CONCAT('%', #{infoParam.keyword},'%')
or t2.cust_name = #{infoParam.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.mobile = #{infoParam.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.mobile_suffix = #{infoParam.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.cust_name_like LIKE CONCAT('%',#{infoParam.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
or t2.nick_name = #{infoParam.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.phonenumber = #{infoParam.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
# or t2.mobile_suffix = #{infoParam.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.SM4EncDecHandler}
or t2.nick_name_like LIKE CONCAT('%',#{infoParam.keyword,typeHandler=com.bonus.canteen.core.common.encrypt.CipherQueryLikeHandler},'%')
)
</sql>
@ -698,9 +698,9 @@
<!-- 查询账户信息-->
<!-- 查询账户信息-->
<select id="queryAccStatusByCustIdList" resultType="com.bonus.canteen.core.account.v3.mq.send.model.AccStatusChangeModel">
SELECT cust_name,
SELECT nick_name as cust_name,
cust_id
FROM cust_info
FROM sys_user
WHERE cust_id in
<foreach collection="custIdList" item="custId" separator="," open="(" close=")">
#{custId}