Commit 6fe92404 by fudahua

企业门店初始化

parent 6f4bed24
...@@ -114,4 +114,10 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -114,4 +114,10 @@ public interface TabHaobanStaffClerkRelationMapper {
* @param storeIds * @param storeIds
*/ */
void delByStoreIds(@Param("storeIds") Set<String> storeIds); void delByStoreIds(@Param("storeIds") Set<String> storeIds);
/**
* 已使用的门店id列表
* @param enterpriseId
*/
List<TabHaobanStaffClerkRelation> listBindStoreIdByEnterpriseId(String enterpriseId);
} }
\ No newline at end of file
...@@ -113,5 +113,13 @@ public interface StaffClerkRelationService { ...@@ -113,5 +113,13 @@ public interface StaffClerkRelationService {
*/ */
List<StaffClerkRelationDTO> listBindByStoreId(String wxEnterpriseId, String storeId); List<StaffClerkRelationDTO> listBindByStoreId(String wxEnterpriseId, String storeId);
/**
* 查询门店列表
*
* @param enterpriseId
* @return
*/
List<StaffClerkRelationDTO> listBindStoreIdByEnterpriseId(String enterpriseId);
} }
...@@ -284,4 +284,10 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -284,4 +284,10 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
List<TabHaobanStaffClerkRelation> ret = mapper.listBindByStoreId(wxEnterpriseId, storeId); List<TabHaobanStaffClerkRelation> ret = mapper.listBindByStoreId(wxEnterpriseId, storeId);
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, ret); return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, ret);
} }
@Override
public List<StaffClerkRelationDTO> listBindStoreIdByEnterpriseId(String enterpriseId) {
List<TabHaobanStaffClerkRelation> clerkRelations = mapper.listBindStoreIdByEnterpriseId(enterpriseId);
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, clerkRelations);
}
} }
...@@ -424,4 +424,15 @@ ...@@ -424,4 +424,15 @@
</foreach> </foreach>
and status_flag =1 and status_flag =1
</update> </update>
<select id="listBindStoreIdByEnterpriseId" resultMap="BaseResultMap">
select
store_id,
wx_enterprise_id
from tab_haoban_staff_clerk_relation
where
enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag =1
group by store_id
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -6,6 +6,9 @@ import java.time.format.DateTimeFormatter; ...@@ -6,6 +6,9 @@ import java.time.format.DateTimeFormatter;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import cn.hutool.core.util.HexUtil;
import cn.hutool.crypto.SecureUtil;
import com.gic.commons.util.ToolUtil;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -38,6 +41,7 @@ public class UploadController extends WebBaseController{ ...@@ -38,6 +41,7 @@ public class UploadController extends WebBaseController{
} }
String name = file.getOriginalFilename(); String name = file.getOriginalFilename();
String suffix = name.substring(name.lastIndexOf(".") + 1); String suffix = name.substring(name.lastIndexOf(".") + 1);
name = SecureUtil.md5(name) + "." + suffix;
String location = System.getProperty( "user.dir" )+"/data/tmp/"; String location = System.getProperty( "user.dir" )+"/data/tmp/";
//b //b
long len = file.getSize(); long len = file.getSize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment