Merge branch 'master' into cc_20251010_wxnotice
# Conflicts: # coolstore-partner-service/src/main/java/com/cool/store/service/impl/MessageTemplateServiceImpl.java
This commit is contained in:
@@ -4,8 +4,8 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.UserDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.login.UserLoginDO;
|
||||
import com.cool.store.mapper.EnterpriseUserMapper;
|
||||
import com.cool.store.response.oppty.UserResponse;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -175,4 +175,13 @@ public class EnterpriseUserDAO {
|
||||
}
|
||||
return enterpriseUserMapper.searchUserByUserIdsAndKeyword(userIdList, keyword);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从平台库根据唯一id获取用户登录信息
|
||||
* @param unionid 唯一id
|
||||
* @return 用户登录信息
|
||||
*/
|
||||
public UserLoginDO getUserLoginByUnionid(String unionid) {
|
||||
return enterpriseUserMapper.getUserLoginByUnionid(unionid);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.mapper.StoreMapper;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
@@ -83,4 +84,22 @@ public class StoreDao {
|
||||
return storeMapper.getStoreNumByStoreCodes(storeCodeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或编辑最新订货时间
|
||||
* @param dtoList 门店最新订货时间DTO列表
|
||||
* @return int
|
||||
*/
|
||||
public void batchInsertOrUpdateOrderTime(List<StoreOrderTimeDTO> dtoList) {
|
||||
if (CollectionUtils.isEmpty(dtoList)) {
|
||||
return ;
|
||||
}
|
||||
storeMapper.batchInsertOrUpdateOrderTime(dtoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有门店id和门店编码
|
||||
*/
|
||||
public List<StoreDO> getAllStoreIdAndNum(List<String> storeStatus) {
|
||||
return storeMapper.getAllStoreIdAndNum(storeStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.annotation.PlatformDB;
|
||||
import com.cool.store.dto.UserDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.login.UserLoginDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -103,4 +105,12 @@ public interface EnterpriseUserMapper {
|
||||
List<EnterpriseUserDO> searchUserByUserIdsAndKeyword( @Param("userIdList") List<String> userIdList, @Param("keyword") String keyword);
|
||||
|
||||
List<String> getUserIdsByRegionIdList( @Param("regionIdList") List<String> regionIdList);
|
||||
|
||||
/**
|
||||
* 从平台库根据唯一id获取用户登录信息
|
||||
* @param unionid 唯一id
|
||||
* @return 用户登录信息
|
||||
*/
|
||||
@PlatformDB
|
||||
UserLoginDO getUserLoginByUnionid(@Param("unionid") String unionid);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.store.StoreAreaDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -47,4 +48,15 @@ public interface StoreMapper {
|
||||
|
||||
List<StoreAreaDTO> listStoreByRegionPathList(@Param("regionPathList") List<String> regionPathList);
|
||||
|
||||
/**
|
||||
* 批量新增或编辑最新订货时间
|
||||
* @param dtoList 门店最新订货时间DTO列表
|
||||
* @return int
|
||||
*/
|
||||
int batchInsertOrUpdateOrderTime(@Param("dtoList") List<StoreOrderTimeDTO> dtoList);
|
||||
|
||||
/**
|
||||
* 查询所有门店id和门店编码
|
||||
*/
|
||||
List<StoreDO> getAllStoreIdAndNum(@Param("storeStatus") List<String> storeStatus);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<result column="user_region_ids" jdbcType="LONGVARCHAR" property="userRegionIds"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, name, remark, mobile, email, main_admin, is_admin, unionid,
|
||||
id, user_id, name, remark, mobile, email, main_admin, is_admin, unionid,departments,
|
||||
avatar, jobnumber, is_leader, is_leader_in_depts, face_url, user_status, create_time,
|
||||
third_oa_unique_flag
|
||||
</sql>
|
||||
@@ -235,4 +235,10 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getUserLoginByUnionid" resultType="com.cool.store.entity.login.UserLoginDO">
|
||||
SELECT user_id, mobile, password
|
||||
FROM enterprise_user
|
||||
WHERE unionid = #{unionid} AND active = true
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -222,4 +222,37 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="batchInsertOrUpdateOrderTime">
|
||||
INSERT INTO store_extend_info_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
store_id,
|
||||
latest_order_time
|
||||
</trim>
|
||||
VALUES
|
||||
<foreach collection="dtoList" item="dto" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{dto.storeId},
|
||||
#{dto.latestOrderTime}
|
||||
</trim>
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
store_id = VALUES(store_id),
|
||||
latest_order_time = VALUES(latest_order_time),
|
||||
update_time = now(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<select id="getAllStoreIdAndNum" resultType="com.cool.store.entity.StoreDO">
|
||||
SELECT store_id, store_num
|
||||
FROM store_${enterpriseId}
|
||||
WHERE is_delete = 'effective'
|
||||
<if test="storeStatus != null and !storeStatus.isEmpty()">
|
||||
AND store_status IN
|
||||
<foreach item="item" collection="storeStatus" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<result column="operator_list" property="operatorList" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO zxjp_store_message (
|
||||
store_id,
|
||||
store_code,
|
||||
|
||||
Reference in New Issue
Block a user