Merge branch 'master' into liuxin0527

This commit is contained in:
sxu 2025-05-27 18:39:33 +08:00
commit 515564709e
13 changed files with 56 additions and 333 deletions

View File

@ -76,7 +76,9 @@ public interface AccInfoMapper extends BaseMapper<AccountInfo> {
AccInfoDetailsVO queryAccInfoBalanceSum(@Param("accountInfoQueryParam") AccountInfoQueryParam accountInfoQueryParam,
@Param("encryptedSearchValue") String encryptedSearchValue);
void updateAccInfoEndDateByUserId(LocalDate endDate, List<Long> userIds, String updateBy);
void updateAccInfoEndDateByUserId(@Param("endDate") LocalDate endDate,
@Param("userIds") List<Long> userIds,
@Param("updateBy") String updateBy);
List<AccInfoDetailsVO> queryAccInfoByUserIds(@Param("userIds") List<Long> userIds);
AccInfoDetailsVO queryAccInfoByUserId(@Param("userId") Long userId);

View File

@ -55,7 +55,7 @@ public class BasicCanteenEvaluateController extends BaseController {
@ApiOperation(value = "导出食堂评价列表")
//@PreventRepeatSubmit
//@RequiresPermissions("basic:evaluate:export")
@SysLog(title = "食堂评价", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出食堂评价")
@SysLog(title = "食堂评价", businessType = OperaType.EXPORT, logType = 1,module = "食堂管理->导出食堂评价")
@PostMapping("/export")
public void export(HttpServletResponse response, BasicCanteenEvaluate basicCanteenEvaluate) {
List<BasicCanteenEvaluate> list = basicCanteenEvaluateService.selectBasicCanteenEvaluateList(basicCanteenEvaluate);
@ -79,7 +79,7 @@ public class BasicCanteenEvaluateController extends BaseController {
@ApiOperation(value = "新增食堂评价")
//@PreventRepeatSubmit
//@RequiresPermissions("basic:evaluate:add")
@SysLog(title = "食堂评价", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增食堂评价")
@SysLog(title = "食堂评价", businessType = OperaType.INSERT, logType = 1,module = "食堂管理->新增食堂评价")
@PostMapping
public AjaxResult add(@RequestBody BasicCanteenEvaluate basicCanteenEvaluate) {
try {
@ -95,7 +95,7 @@ public class BasicCanteenEvaluateController extends BaseController {
@ApiOperation(value = "修改食堂评价")
//@PreventRepeatSubmit
//@RequiresPermissions("basic:evaluate:edit")
@SysLog(title = "食堂评价", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改食堂评价")
@SysLog(title = "食堂评价", businessType = OperaType.UPDATE, logType = 1,module = "食堂管理->修改食堂评价")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody BasicCanteenEvaluate basicCanteenEvaluate) {
try {
@ -111,7 +111,7 @@ public class BasicCanteenEvaluateController extends BaseController {
@ApiOperation(value = "删除食堂评价")
//@PreventRepeatSubmit
//@RequiresPermissions("basic:evaluate:remove")
@SysLog(title = "食堂评价", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除食堂评价")
@SysLog(title = "食堂评价", businessType = OperaType.DELETE, logType = 1,module = "食堂管理->删除食堂评价")
@PostMapping("/del/{evaluateIds}")
public AjaxResult remove(@PathVariable Long[] evaluateIds) {
return toAjax(basicCanteenEvaluateService.deleteBasicCanteenEvaluateByEvaluateIds(evaluateIds));

View File

@ -55,7 +55,7 @@ public class BasicCanteenSuggestionController extends BaseController {
@ApiOperation(value = "导出投诉建议 列表")
//@PreventRepeatSubmit
//@RequiresPermissions("basic:suggestion:export")
@SysLog(title = "投诉建议 ", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出投诉建议 ")
@SysLog(title = "投诉建议 ", businessType = OperaType.EXPORT, logType = 1,module = "食堂管理->导出投诉建议 ")
@PostMapping("/export")
public void export(HttpServletResponse response, BasicCanteenSuggestion basicCanteenSuggestion) {
List<BasicCanteenSuggestion> list = basicCanteenSuggestionService.selectBasicCanteenSuggestionList(basicCanteenSuggestion);
@ -79,7 +79,7 @@ public class BasicCanteenSuggestionController extends BaseController {
@ApiOperation(value = "新增投诉建议 ")
//@PreventRepeatSubmit
//@RequiresPermissions("basic:suggestion:add")
@SysLog(title = "投诉建议 ", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增投诉建议 ")
@SysLog(title = "投诉建议 ", businessType = OperaType.INSERT, logType = 1,module = "食堂管理->新增投诉建议 ")
@PostMapping
public AjaxResult add(@RequestBody BasicCanteenSuggestion basicCanteenSuggestion) {
try {
@ -95,7 +95,7 @@ public class BasicCanteenSuggestionController extends BaseController {
@ApiOperation(value = "修改投诉建议 ")
//@PreventRepeatSubmit
//@RequiresPermissions("basic:suggestion:edit")
@SysLog(title = "投诉建议 ", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改投诉建议 ")
@SysLog(title = "投诉建议 ", businessType = OperaType.UPDATE, logType = 1,module = "食堂管理->修改投诉建议 ")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody BasicCanteenSuggestion basicCanteenSuggestion) {
try {
@ -105,13 +105,27 @@ public class BasicCanteenSuggestionController extends BaseController {
}
}
@ApiOperation(value = "回复投诉建议 ")
//@PreventRepeatSubmit
//@RequiresPermissions("alloc:suggestion:edit")
@SysLog(title = "回复投诉建议 ", businessType = OperaType.UPDATE, logType = 1,module = "食堂管理->回复投诉建议 ")
@PostMapping("/reply")
public AjaxResult reply(@RequestBody BasicCanteenSuggestion basicCanteenSuggestion) {
try {
basicCanteenSuggestion.setReplyState(1L);
return toAjax(basicCanteenSuggestionService.updateBasicCanteenSuggestion(basicCanteenSuggestion));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
}
}
/**
* 删除投诉建议
*/
@ApiOperation(value = "删除投诉建议 ")
//@PreventRepeatSubmit
//@RequiresPermissions("basic:suggestion:remove")
@SysLog(title = "投诉建议 ", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除投诉建议 ")
@SysLog(title = "投诉建议 ", businessType = OperaType.DELETE, logType = 1,module = "食堂管理->删除投诉建议 ")
@PostMapping("/del/{suggestionIds}")
public AjaxResult remove(@PathVariable Long[] suggestionIds) {
return toAjax(basicCanteenSuggestionService.deleteBasicCanteenSuggestionBySuggestionIds(suggestionIds));

View File

@ -30,21 +30,29 @@ public class BasicCanteenEvaluate extends BaseEntity {
@ApiModelProperty(value = "人员ID")
private Long userId;
private String nickName;
/** 区域ID */
@Excel(name = " 区域ID")
@ApiModelProperty(value = " 区域ID")
private Long areaId;
private String areaName;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
private String canteenName;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private Long stallId;
private String stallName;
/** 评价日期 */
@ApiModelProperty(value = "评价日期")
@JsonFormat(pattern = "yyyy-MM-dd")

View File

@ -55,6 +55,12 @@ public class BasicCanteenSuggestion extends BaseEntity {
@ApiModelProperty(value = "是否回复(1是,2否)")
private Long replyState;
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("结束时间")
private String endTime;
/** 回复者用户id */
@Excel(name = "回复者用户id")
@ApiModelProperty(value = "回复者用户id")

View File

@ -1,154 +0,0 @@
package com.bonus.canteen.core.config;//package com.bonus.canteen.core.config;
//
//import cn.hutool.core.map.MapUtil;
//import com.bonus.canteen.core.customer.service.AuthorizingService;
//import com.bonus.canteen.core.secure.PmsCache;
//import com.fasterxml.jackson.core.JsonProcessingException;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.google.common.collect.Maps;
//import com.google.common.collect.Sets;
//import org.apache.commons.collections4.CollectionUtils;
//import org.apache.commons.collections4.ListUtils;
//import org.apache.commons.lang3.BooleanUtils;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.data.redis.core.BoundHashOperations;
//import org.springframework.data.redis.core.StringRedisTemplate;
//import java.time.Instant;
//import java.util.*;
//import java.util.function.Function;
//import java.util.stream.Collectors;
//import java.util.stream.Stream;
//
//public class SecureManager {
// private static final Logger log = LoggerFactory.getLogger(SecureManager.class);
// private static SecureProperties secureProperties;
// private static StringRedisTemplate redisTemplate;
// private static AuthorizingService authorizingService;
// private static ObjectMapper objectMapper;
//
// private SecureManager() {
// }
//
// public static void setSecureProperties(SecureProperties secureProperties) {
// if (SecureManager.secureProperties == null) {
// SecureManager.secureProperties = secureProperties;
// }
// }
//
// public static void setRedisTemplate(StringRedisTemplate redisTemplate) {
// if (SecureManager.redisTemplate == null) {
// SecureManager.redisTemplate = redisTemplate;
// }
// }
//
// public static void setAuthorizingService(AuthorizingService authorizingService) {
// if (SecureManager.authorizingService == null) {
// SecureManager.authorizingService = authorizingService;
// }
// }
//
// public static void setObjectMapper(ObjectMapper objectMapper) {
// if (SecureManager.objectMapper == null) {
// SecureManager.objectMapper = objectMapper;
// }
// }
//
// private static String getPmsKey(long subjectId) {
// return "permissions:subject_id:" + subjectId;
// }
//
// private static String getRoleKey(long subjectId) {
// return "roles:subject_id:" + subjectId;
// }
//
// public static void clearAllRoleAndPermission() {
// redisTemplate.delete(secureProperties.getPermissionKey());
// }
//
// public static void clearRoleAndPermission(long subjectId) {
// redisTemplate.boundHashOps(secureProperties.getPermissionKey()).delete(new Object[]{getRoleKey(subjectId), getPmsKey(subjectId)});
// }
//
// public static void clearRole(long subjectId) {
// redisTemplate.boundHashOps(secureProperties.getPermissionKey()).delete(new Object[]{getRoleKey(subjectId)});
// }
//
// public static void clearPermission(long subjectId) {
// redisTemplate.boundHashOps(secureProperties.getPermissionKey()).delete(new Object[]{getPmsKey(subjectId)});
// }
//
// public static boolean isLogin() {
// return (Boolean)WebContext.get().getAccessToken().map(AccessToken::isAuthenticated).orElse(false);
// }
//
// public static Optional<Long> getSubjectId() {
// return WebContext.get().getAccessToken().map(AccessToken::getSubjectId);
// }
//
// public static Optional<String> getSubjectName() {
// return WebContext.get().getAccessToken().map(AccessToken::getSubjectName);
// }
//
// public static Map<String, String> getSubjectData() {
// return (Map)WebContext.get().getAccessToken().map(AccessToken::getSubjectData).orElse(Maps.newHashMap());
// }
//
// public static Map<String, String> attachData(Map<String, String> data) {
// try {
// if (MapUtil.isEmpty(data)) {
// return Maps.newHashMapWithExpectedSize(0);
// } else {
// AccessToken accessToken = (AccessToken)WebContext.get().getAccessToken().orElse(AccessToken.create());
// Objects.requireNonNull(accessToken);
// data.forEach(accessToken::setData);
// accessToken.bind().store();
// return accessToken.getSubjectData();
// }
// } catch (Throwable var2) {
// throw var2;
// }
// }
//
// public static Map<String, String> attachData(String key, String value) {
// try {
// return attachData(Collections.singletonMap(key, value));
// } catch (Throwable var3) {
// throw var3;
// }
// }
//
// public static void logout() {
// WebContext.get().getAccessToken().ifPresent(AccessToken::clear);
// }
//
// public static void revokeAuthenticate() {
// WebContext.get().getAccessToken().ifPresent((accessToken) -> {
// accessToken.revokeAuthenticate().store();
// });
// }
//
// public static void revokeAuthenticate(long subjectId, int reservedRecentNum) {
// StringRedisTemplate var10000 = redisTemplate;
// String var10001 = secureProperties.getServer().getSubjectRefTokenKey();
// Set<String> keys = var10000.keys(var10001 + ":" + subjectId + ":*");
// if (CollectionUtils.size(keys) > reservedRecentNum) {
// assert keys != null;
//
// Map<Long, List<String>> createTimeAsc_keys = (Map)keys.stream().collect(Collectors.groupingBy((key) -> {
// return Long.parseLong(key.split(":")[4]);
// }, TreeMap::new, Collectors.toList()));
// List<String> keysAsc = createTimeAsc_keys.values().stream().flatMap(Collection::stream).collect(Collectors.toList());
// List<String> beDeleteRefKeys = keysAsc.subList(0, keysAsc.size() - reservedRecentNum);
// List<String> beDeleteTokenKeys = beDeleteRefKeys.stream().map((dk) -> {
// String var100001 = secureProperties.getServer().getStoreKey();
// return var100001 + ":" + dk.split(":")[3];
// }).collect(Collectors.toList());
// redisTemplate.delete(ListUtils.sum(beDeleteRefKeys, beDeleteTokenKeys));
// }
// }
//
// public String toString() {
// return "SecureManager()";
// }
//}

View File

@ -1,96 +0,0 @@
package com.bonus.canteen.core.utils;
import cn.hutool.core.date.DateUtil;
import com.bonus.canteen.core.common.utils.RedisUtil;
import com.bonus.canteen.core.common.utils.SpringContextHolder;
import com.bonus.canteen.core.common.utils.TenantContextHolder;
import com.bonus.common.houqin.constant.GlobalConstants;
import org.springframework.data.redis.core.RedisTemplate;
import java.time.LocalDateTime;
public class CustomIdGenerateUtil {
public static String generatePurchaseOrdId() {
return generateFixedRuleId("purchaseOrderId:", "CGJH", 3, 3);
}
public static String generateIntoId() {
return generateFixedRuleId("intoId:", "RKD", 3, 3);
}
public static String generateOutId() {
return generateFixedRuleId("outId:", "CKD", 3, 3);
}
public static String generateCheckId() {
return generateFixedRuleId("checkId:", "PDD", 3, 3);
}
public static String generateInquiryId() {
return generateFixedRuleId("inquiryId:", "XJD", 3, 3);
}
public static String generateProductionId() {
return generateFixedRuleId("productionId:", "SCJH", 3, 3);
}
public static String generateDeliveryGoodsId() {
return generateFixedRuleId("deliveryGoodsId:", "SHD", 3, 3);
}
public static String generateOrderGoodsId() {
return generateFixedRuleId("orderGoodsId:", "CGDD", 3, 3);
}
public static String generateMaterialInquiryId() {
return generateFixedRuleId("materialInquiryId:", "HPXJD", 3, 3);
}
public static String generateInspectGoodsId() {
return generateFixedRuleId("inspectGoodsId:", "YHD", 3, 3);
}
public static String generateRefundGoodsId() {
return generateFixedRuleId("refundGoodsId:", "THD", 3, 3);
}
public static String generateFetchMaterialId() {
return generateFixedRuleId("fetchMaterialId:", "LLD", 3, 3);
}
public static String generateGoodsAllocationId() {
return generateFixedRuleId("goodsAllocationId", "HPDB", 3, 3);
}
public static String generateContractId() {
return generateFixedRuleId("drpContractId:", "CGHT", 3, 3);
}
public static String generateAdjustmentOrderId() {
return generateFixedRuleId("drpAdjustmentOrderId:", "TJD", 3, 3);
}
public static String generateMarketPriceId() {
return generateFixedRuleId("drpAdjustmentOrderId:", "SCJ", 3, 3);
}
public static String generateFixedRuleId(String redisKey, String idPrefix, Integer randomLength, Integer length) {
Long var10000 = GlobalConstants.TENANT_ID;
redisKey = "ystKey:" + var10000 + ":" + redisKey;
Long incr = RedisUtil.getIncr(redisTemplate(), redisKey);
return idPrefix + DateUtil.format(LocalDateTime.now(), "yyyyMMdd") + getRandomDigit(randomLength) + (length <= 0 ? "" : String.format("%0" + length + "d", incr));
}
private static RedisTemplate<Object, Object> redisTemplate() {
return (RedisTemplate) SpringContextHolder.getBean("redisTemplate");
}
public static String getRandomDigit(int length) {
if (length <= 0) {
return "";
} else {
int num = (int)(Math.random() * Math.pow(10.0, (double)length));
return String.format("%0" + length + "d", num);
}
}
}

View File

@ -1,31 +0,0 @@
package com.bonus.canteen.core.utils.excel;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.exception.ExcelDataConvertException;
import com.alibaba.excel.metadata.data.CellData;
import com.alibaba.excel.read.builder.ExcelReaderSheetBuilder;
import com.bonus.common.core.exception.ServiceException;
import org.springframework.web.multipart.MultipartFile;
import com.bonus.canteen.core.common.config.excel.ExcelListener;
import java.util.List;
public class EasyExcelUtil {
public static <T> List<T> readSingleExcel(MultipartFile excel, T t, int headRowNumber) throws Exception {
String filename = excel.getOriginalFilename();
if (filename != null && (filename.toLowerCase().endsWith(".xls") || filename.toLowerCase().endsWith(".xlsx"))) {
try {
return ((ExcelReaderSheetBuilder)EasyExcel.read(excel.getInputStream(), t.getClass(), new ExcelListener()).sheet().headRowNumber(headRowNumber)).doReadSync();
} catch (ExcelDataConvertException var8) {
int rowIndex = var8.getRowIndex();
CellData<?> cellData = var8.getCellData();
String stringValue = cellData.getStringValue();
throw new ServiceException("" + rowIndex + "行【" + stringValue + "】数据格式错误!");
} catch (Exception var9) {
throw new ServiceException("文件读取失败,请检查重试!"+ var9.getMessage());
}
} else {
throw new ServiceException("文件格式错误!");
}
}
}

View File

@ -1,32 +0,0 @@
package com.bonus.canteen.core.common.config.excel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import java.util.ArrayList;
import java.util.List;
public class ExcelListener extends AnalysisEventListener {
private List<Object> datas = new ArrayList();
@Override
public void invoke(Object object, AnalysisContext context) {
this.datas.add(object);
this.doSomething();
}
private void doSomething() {
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
}
public List<Object> getDatas() {
return this.datas;
}
public void setDatas(List<Object> datas) {
this.datas = datas;
}
}

View File

@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where account_id = #{accId}
</select>
<insert id="insertAccInfo" parameterType="com.bonus.canteen.core.account.domain.AccountInfo" useGeneratedKeys="true" keyProperty="accId">
<insert id="insertAccInfo" parameterType="com.bonus.canteen.core.account.domain.AccountInfo" useGeneratedKeys="true" keyProperty="accountId">
insert into account_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="accountName != null and accountName != ''">account_name,</if>
@ -152,7 +152,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">#{userId},</if>
<if test="scope != null">#{scope},</if>
<if test="endDate != null">#{endDate},</if>
<if test="redValidityDate != null">#{redValidityDate},</if>
<if test="accountStatus != null">#{accountStatus},</if>
<if test="payPwd != null and payPwd != ''">#{payPwd},</if>
<if test="lastCreditTime != null">#{lastCreditTime},</if>
@ -224,7 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteAccInfoByIds" parameterType="String">
update account_info set del_flag = '2' where account_id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{accId}
#{id}
</foreach>
</delete>

View File

@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="batchInsertAccWalletInfo" parameterType="com.bonus.canteen.core.account.domain.AccWalletInfo">
insert into account_wallet_info(user_id,account_id,wallet_type,create_by,create_time) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.userId},#{item.accId},#{item.walletType},#{item.createBy},NOW())
(#{item.userId},#{item.accountId},#{item.walletType},#{item.createBy},NOW())
</foreach>
</insert>

View File

@ -6,9 +6,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.bonus.canteen.core.basic.domain.BasicCanteenEvaluate" id="BasicCanteenEvaluateResult">
<result property="evaluateId" column="evaluate_id" />
<result property="userId" column="user_id" />
<result property="nickName" column="nick_name" />
<result property="areaId" column="area_id" />
<result property="areaName" column="area_name" />
<result property="canteenId" column="canteen_id" />
<result property="canteenName" column="canteen_name" />
<result property="stallId" column="stall_id" />
<result property="stallName" column="stall_name" />
<result property="evaluateDate" column="evaluate_date" />
<result property="appearance" column="appearance" />
<result property="attitude" column="attitude" />

View File

@ -30,13 +30,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasicCanteenSuggestionList" parameterType="com.bonus.canteen.core.basic.domain.BasicCanteenSuggestion" resultMap="BasicCanteenSuggestionResult">
<include refid="selectBasicCanteenSuggestionVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
<if test="contactTel != null and contactTel != ''"> and contact_tel = #{contactTel}</if>
<if test="replyContent != null and replyContent != ''"> and reply_content = #{replyContent}</if>
<if test="replyState != null "> and reply_state = #{replyState}</if>
<if test="replyUserId != null "> and reply_user_id = #{replyUserId}</if>
<if test="userId != null "> and bcs.user_id = #{userId}</if>
<if test="content != null and content != ''"> and bcs.content like concat('%', #{content}, '%')</if>
<if test="canteenId != null "> and bcs.canteen_id = #{canteenId}</if>
<if test="contactTel != null and contactTel != ''"> and bcs.contact_tel = #{contactTel}</if>
<if test="replyContent != null and replyContent != ''"> and bcs.reply_content = #{replyContent}</if>
<if test="replyState != null "> and bcs.reply_state = #{replyState}</if>
<if test="replyUserId != null "> and bcs.reply_user_id = #{replyUserId}</if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
and bcs.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime},' 23:59:59')
</if>
</where>
</select>