| | |
| | | |
| | | List<TStoreListVo> listAllStore(@Param("page") Page<TStoreListVo> page, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("name") String name, @Param("phone") String phone, @Param("shopName") String shopName, @Param("id") Integer id); |
| | | |
| | | List<TStoreListVo> listAllStoresByIds(@Param("page") Page<TStoreListVo> page, |
| | | @Param("provinceCode") String provinceCode, |
| | | @Param("cityCode") String cityCode, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone, |
| | | @Param("shopName") String shopName, |
| | | @Param("ids") List<Integer> ids); |
| | | |
| | | |
| | | |
| | | List<Map<String, Object>> listStoreAll(Page page, @Param("name") String name, |
| | |
| | | audit.put("errorMessage", maskText(errorMessage)); |
| | | audit.put("createdAt", new Date()); |
| | | auditWriter.append(audit); |
| | | } catch (Exception auditException) { |
| | | } catch (Throwable auditException) { |
| | | // 审计失败不能影响原有业务。 |
| | | log.error("统一操作审计记录出错", auditException); |
| | | } |
| | |
| | | audit.put("errorMessage", mask(error)); |
| | | audit.put("createdAt", new Date()); |
| | | auditWriter.append(audit); |
| | | } catch (Exception ignored) { |
| | | } catch (Throwable ignored) { |
| | | // 审计链路不能影响后台业务。 |
| | | } |
| | | } |
| | |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | List<TStoreListVo> list =new ArrayList<>(); |
| | | if("3".equals(roleid)){ |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | list = storeService.listAllStore(page,provinceCode,cityCode,name,phone,shopName,objectId); |
| | | // 门店员工按员工-门店中间表的数据范围查询;getStoreIdsByUserId 同时兼容 |
| | | // sys_user.objectId 和 t_store.storeStaffId 两种历史归属数据。 |
| | | List<Integer> storeIds = userMapper.getStoreIdsByUserId(UserExt.getUser().getId()); |
| | | if (!CollectionUtils.isEmpty(storeIds)) { |
| | | list = storeService.listAllStoresByIds(page, provinceCode, cityCode, name, phone, shopName, storeIds); |
| | | } |
| | | }else { |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | list = storeService.listAll(page,provinceCode,cityCode,name,phone,shopName,objectId); |
| | |
| | | |
| | | List<TStoreListVo> listAllStore(Page<TStoreListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName, Integer objectId); |
| | | |
| | | List<TStoreListVo> listAllStoresByIds(Page<TStoreListVo> page, String provinceCode, String cityCode, |
| | | String name, String phone, String shopName, List<Integer> ids); |
| | | |
| | | |
| | | List<Map<String, Object>> listStoreAll(Page page, String name, Integer operator, String provinceCode, String cityCode); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<TStoreListVo> listAllStoresByIds(Page<TStoreListVo> page, String provinceCode, String cityCode, |
| | | String name, String phone, String shopName, List<Integer> ids) { |
| | | return this.baseMapper.listAllStoresByIds(page, provinceCode, cityCode, name, phone, shopName, ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> querySiteListOfpage(String provinceCode, String cityCode, Integer operatorId, String storeName, Integer storeId) { |
| | | return this.baseMapper.querySiteListOfpage(provinceCode,cityCode,operatorId,storeName,storeId); |
| | | } |
| | |
| | | </if> |
| | | order by t1.id desc |
| | | </select> |
| | | <select id="listAllStoresByIds" resultType="com.dsh.guns.modular.system.model.TStoreListVo"> |
| | | select t1.*, |
| | | t2.name as userName, |
| | | coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone, |
| | | coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone, |
| | | t3.name as yysName |
| | | from t_store t1 |
| | | left join sys_user t2 on t1.storeStaffId = t2.id |
| | | left join t_operator t3 on t1.operatorId = t3.id |
| | | where t1.id in |
| | | <foreach collection="ids" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | <if test="provinceCode !=null and provinceCode !=''"> |
| | | and t1.provinceCode = #{provinceCode} |
| | | </if> |
| | | <if test="cityCode !=null and cityCode !=''"> |
| | | and t1.cityCode = #{cityCode} |
| | | </if> |
| | | <if test="name !=null and name !=''"> |
| | | and t2.name like concat("%",#{name},"%") |
| | | </if> |
| | | <if test="phone !=null and phone !=''"> |
| | | and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%") |
| | | </if> |
| | | <if test="shopName !=null and shopName !=''"> |
| | | and t1.name like concat("%",#{shopName},"%") |
| | | </if> |
| | | order by t1.id desc |
| | | </select> |
| | | <select id="querySiteListOfpage" resultType="java.util.Map"> |
| | | SELECT t1.id, t2.operatorId, t1.province, t1.city, t2.name,t1.ids,t1.name as siteName |
| | | ,t2.type as `type` |
| | |
| | | @} |
| | | </#select> |
| | | @if(role == 1){ |
| | | <#select id="deptid" name="角色" underline="true" > |
| | | <#select id="deptid" name="所在部门" underline="true" > |
| | | @for(l in depts){ |
| | | <option value="${l.id}" ${l.id == user.deptid ? 'selected=selected' : ''}>${l.fullname}</option> |
| | | @} |