提交 dd48989f 作者: zhenjie

解决冲突

...@@ -5,3 +5,4 @@ metadata: ...@@ -5,3 +5,4 @@ metadata:
namespace: default namespace: default
data: data:
SPRING_PROFILES_ACTIVE: default SPRING_PROFILES_ACTIVE: default
SW_AGENT_COLLECTOR_BACKEND_SERVICES: "default-oap:11800"
...@@ -14,6 +14,7 @@ spec: ...@@ -14,6 +14,7 @@ spec:
metadata: metadata:
labels: labels:
app: pms app: pms
swck-java-agent-injected: 'true'
spec: spec:
containers: containers:
- name: pms - name: pms
...@@ -33,6 +34,11 @@ spec: ...@@ -33,6 +34,11 @@ spec:
configMapKeyRef: configMapKeyRef:
name: pms-map name: pms-map
key: SPRING_PROFILES_ACTIVE key: SPRING_PROFILES_ACTIVE
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
valueFrom:
configMapKeyRef:
name: pms-map
key: SW_AGENT_COLLECTOR_BACKEND_SERVICES
volumes: volumes:
- name: log-of-app - name: log-of-app
hostPath: hostPath:
......
...@@ -18,4 +18,4 @@ patches: ...@@ -18,4 +18,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag: 4f4b315dae822973a98907e615f45940937f4d1d newTag: a867fba96ec08a2bc2dc53d1ed1fb8c77e6fc287
package com.mmc.pms.constant;
public interface DateConstant {
String YYYYMMDDHHMMSS = "yyyy-MM-dd HH:mm:ss";
}
...@@ -8,7 +8,7 @@ import com.mmc.pms.model.qo.ServiceQO; ...@@ -8,7 +8,7 @@ import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO; import com.mmc.pms.model.work.dto.ServiceDTO;
import com.mmc.pms.model.work.dto.WorkServiceDTO; import com.mmc.pms.model.work.dto.WorkServiceDTO;
import com.mmc.pms.model.work.vo.ServiceVO; import com.mmc.pms.model.work.vo.ServiceVO;
import com.mmc.pms.page.PageResult; import com.mmc.pms.model.work.vo.UpAndDownServiceVO;
import com.mmc.pms.service.BackstageTaskService; import com.mmc.pms.service.BackstageTaskService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -46,11 +46,18 @@ public class BackstageTaskServiceController extends BaseController { ...@@ -46,11 +46,18 @@ public class BackstageTaskServiceController extends BaseController {
return backstageTaskService.updateById(param); return backstageTaskService.updateById(param);
} }
@ApiOperation(value = "删除作业服务") @ApiOperation(value = "批量删除作业服务")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("deleteWorkService") @PostMapping("deleteWorkService")
public ResultBody deleteWorkService(@ApiParam("作业服务id") @RequestParam(value = "id") Integer id) { public ResultBody deleteWorkService(@ApiParam("作业服务id") @RequestBody List<Integer> ids) {
return backstageTaskService.deleteById(id); return backstageTaskService.deleteByIds(ids);
}
@ApiOperation(value = "批量上下架作业服务")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("batchUpAndDownWorkService")
public ResultBody batchUpAndDownWorkService(@RequestBody UpAndDownServiceVO param) {
return backstageTaskService.batchUpAndDownWorkService(param);
} }
@ApiOperation(value = "查询作业服务") @ApiOperation(value = "查询作业服务")
......
package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.entity.Categories;
import com.mmc.pms.model.categories.dto.CategoriesDTO;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO;
import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.CategoriesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
* 前端控制器
* </p>
*
* @author Pika
* @since 2023-06-08
*/
@Api(tags = {"后台-目录管理-接口"})
@RestController
@RequestMapping("/directory")
public class DirectoryController {
private final String DIRECTORY_NAME_APPLICATION = "应用";
private final String DIRECTORY_NAME_INDUSTRY = "行业";
@Autowired
private CategoriesService categoriesService;
@ApiOperation(value = "获取应用类型列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CategoriesDTO.class)})
@PostMapping("getApplicationList")
public ResultBody<CategoriesDTO> getApplicationList() {
return categoriesService.getApplicationList(DIRECTORY_NAME_APPLICATION);
}
@ApiOperation(value = "获取对应行业列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CategoriesDTO.class)})
@PostMapping("getIndustryList")
public ResultBody<CategoriesDTO> getIndustryList() {
return categoriesService.getApplicationList(DIRECTORY_NAME_INDUSTRY);
}
}
package com.mmc.pms.dao; package com.mmc.pms.dao;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.entity.ServiceDO; import com.mmc.pms.entity.ServiceDO;
import com.mmc.pms.model.qo.ServiceQO; import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO; import com.mmc.pms.model.work.dto.ServiceDTO;
import com.mmc.pms.model.work.vo.UpAndDownServiceVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -19,7 +21,7 @@ public interface BackstageTaskServiceDao { ...@@ -19,7 +21,7 @@ public interface BackstageTaskServiceDao {
Integer update(ServiceDO serviceDO); Integer update(ServiceDO serviceDO);
Integer deleteById(Integer id); Integer deleteByIds(@Param("ids") List<Integer> ids);
ServiceDO queryById(Integer id); ServiceDO queryById(Integer id);
...@@ -32,4 +34,6 @@ public interface BackstageTaskServiceDao { ...@@ -32,4 +34,6 @@ public interface BackstageTaskServiceDao {
List<ServiceDO> queryPageByLimit(@Param("param") ServiceQO param,@Param("categoriesIds") List<Integer> categoriesIds, @Param("userIds") List<Integer> userIds); List<ServiceDO> queryPageByLimit(@Param("param") ServiceQO param,@Param("categoriesIds") List<Integer> categoriesIds, @Param("userIds") List<Integer> userIds);
List<ServiceDTO> QueryWorkServiceListById(@Param("ids") List<Integer> ids); List<ServiceDTO> QueryWorkServiceListById(@Param("ids") List<Integer> ids);
Integer batchUpAndDownWorkService(@Param("param") UpAndDownServiceVO param);
} }
...@@ -112,4 +112,6 @@ public interface GoodsInfoDao { ...@@ -112,4 +112,6 @@ public interface GoodsInfoDao {
int countGoodsInfoByCategoryId(Integer id); int countGoodsInfoByCategoryId(Integer id);
void updateMallProdSkuInfo(MallProdInfoDO mallProdInfoDO); void updateMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
List<MallProdInfoDO> getAllMallProSkuInfo(Integer goodsInfoId);
} }
...@@ -34,7 +34,7 @@ public class ServiceVO implements Serializable { ...@@ -34,7 +34,7 @@ public class ServiceVO implements Serializable {
@ApiModelProperty(value = "服务名称", example = "服务名称") @ApiModelProperty(value = "服务名称", example = "服务名称")
@NotBlank( @NotBlank(
message = "服务名称不能为空", message = "服务名称不能为空",
groups = {Create.class, Update.class}) groups = {Create.class})
@Length(message = "最大不超过30字", max = 30) @Length(message = "最大不超过30字", max = 30)
private String serviceName; private String serviceName;
...@@ -44,19 +44,19 @@ public class ServiceVO implements Serializable { ...@@ -44,19 +44,19 @@ public class ServiceVO implements Serializable {
@ApiModelProperty(value = "行业", example = "2") @ApiModelProperty(value = "行业", example = "2")
@NotNull( @NotNull(
message = "行业id不能为空", message = "行业id不能为空",
groups = {Create.class, Update.class}) groups = {Create.class})
private Integer industryId; private Integer industryId;
@ApiModelProperty(value = "展示状态,0为上架,1下架", example = "0") @ApiModelProperty(value = "展示状态,0为上架,1下架", example = "0")
@NotNull( @NotNull(
message = "展示状态不能为空", message = "展示状态不能为空",
groups = {Create.class, Update.class}) groups = {Create.class})
private Integer displayState; private Integer displayState;
@ApiModelProperty(value = "封面图") @ApiModelProperty(value = "封面图")
@NotBlank( @NotBlank(
message = "封面图不能为空", message = "封面图不能为空",
groups = {Create.class, Update.class}) groups = {Create.class})
private String coverPlan; private String coverPlan;
@ApiModelProperty(value = "分享卡片") @ApiModelProperty(value = "分享卡片")
......
package com.mmc.pms.model.work.vo;
import com.mmc.pms.model.group.Update;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UpAndDownServiceVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id集合")
@Size(min = 1,message = "修改时id集合不能为空",groups = Update.class)
private List<Integer> ids;
@ApiModelProperty(value = "展示状态,0为上架,1下架", example = "0")
@NotNull(message = "修改时展示状态不能为空",groups = Update.class)
private Integer displayState;
}
...@@ -4,6 +4,7 @@ import com.mmc.pms.common.ResultBody; ...@@ -4,6 +4,7 @@ import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.qo.ServiceQO; import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO; import com.mmc.pms.model.work.dto.ServiceDTO;
import com.mmc.pms.model.work.vo.ServiceVO; import com.mmc.pms.model.work.vo.ServiceVO;
import com.mmc.pms.model.work.vo.UpAndDownServiceVO;
import com.mmc.pms.page.PageResult; import com.mmc.pms.page.PageResult;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -19,7 +20,7 @@ public interface BackstageTaskService { ...@@ -19,7 +20,7 @@ public interface BackstageTaskService {
ResultBody updateById(ServiceVO param); ResultBody updateById(ServiceVO param);
ResultBody deleteById(Integer id); ResultBody deleteByIds(List<Integer> ids);
ResultBody<ServiceDTO> queryById(Integer id); ResultBody<ServiceDTO> queryById(Integer id);
...@@ -28,4 +29,6 @@ public interface BackstageTaskService { ...@@ -28,4 +29,6 @@ public interface BackstageTaskService {
PageResult queryWorkServiceList(ServiceQO param, HttpServletRequest request); PageResult queryWorkServiceList(ServiceQO param, HttpServletRequest request);
List<ServiceDTO> feignQueryWorkServiceListById(List<Integer> ids); List<ServiceDTO> feignQueryWorkServiceListById(List<Integer> ids);
ResultBody batchUpAndDownWorkService(UpAndDownServiceVO param);
} }
...@@ -3,6 +3,7 @@ package com.mmc.pms.service.Impl; ...@@ -3,6 +3,7 @@ package com.mmc.pms.service.Impl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.constant.DateConstant;
import com.mmc.pms.dao.BackstageTaskServiceDao; import com.mmc.pms.dao.BackstageTaskServiceDao;
import com.mmc.pms.dao.CategoriesDao; import com.mmc.pms.dao.CategoriesDao;
import com.mmc.pms.entity.Categories; import com.mmc.pms.entity.Categories;
...@@ -13,10 +14,12 @@ import com.mmc.pms.model.qo.ServiceQO; ...@@ -13,10 +14,12 @@ import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO; import com.mmc.pms.model.work.dto.ServiceDTO;
import com.mmc.pms.model.work.dto.WorkServiceDTO; import com.mmc.pms.model.work.dto.WorkServiceDTO;
import com.mmc.pms.model.work.vo.ServiceVO; import com.mmc.pms.model.work.vo.ServiceVO;
import com.mmc.pms.model.work.vo.UpAndDownServiceVO;
import com.mmc.pms.page.PageResult; import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.BackstageTaskService; import com.mmc.pms.service.BackstageTaskService;
import com.mmc.pms.service.InspComtService; import com.mmc.pms.service.InspComtService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.lang3.RandomUtils; import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -63,8 +66,10 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -63,8 +66,10 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
} }
@Override @Override
public ResultBody deleteById(Integer id) { public ResultBody deleteByIds(List<Integer> ids) {
backstageTaskServiceDao.deleteById(id); if(!CollectionUtils.isEmpty(ids)){
backstageTaskServiceDao.deleteByIds(ids);
}
return ResultBody.success(); return ResultBody.success();
} }
...@@ -137,6 +142,9 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -137,6 +142,9 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
@Override @Override
public PageResult queryWorkServiceList(ServiceQO param, HttpServletRequest request) { public PageResult queryWorkServiceList(ServiceQO param, HttpServletRequest request) {
log.info(
"开始queryWorkServiceList==>{}",
JSONObject.toJSONString(DateFormatUtils.format(new Date(), DateConstant.YYYYMMDDHHMMSS)));
Integer pageNo = param.getPageNo(); Integer pageNo = param.getPageNo();
param.buildCurrentPage(); param.buildCurrentPage();
List<Integer> userIds = null; List<Integer> userIds = null;
...@@ -155,6 +163,9 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -155,6 +163,9 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
List<ServiceDO> pageList = backstageTaskServiceDao.queryPageByLimit(param,categoriesIds,userIds); List<ServiceDO> pageList = backstageTaskServiceDao.queryPageByLimit(param,categoriesIds,userIds);
List<WorkServiceDTO> workServiceDTOList = getWorkServiceDTOS(pageList); List<WorkServiceDTO> workServiceDTOList = getWorkServiceDTOS(pageList);
log.info(
"结束queryWorkServiceList==>{}",
JSONObject.toJSONString(DateFormatUtils.format(new Date(), DateConstant.YYYYMMDDHHMMSS)));
return PageResult.buildPage(pageNo, param.getPageSize(), count, workServiceDTOList); return PageResult.buildPage(pageNo, param.getPageSize(), count, workServiceDTOList);
} }
...@@ -163,6 +174,14 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -163,6 +174,14 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
return backstageTaskServiceDao.QueryWorkServiceListById(ids); return backstageTaskServiceDao.QueryWorkServiceListById(ids);
} }
@Override
public ResultBody batchUpAndDownWorkService(UpAndDownServiceVO param) {
if(!CollectionUtils.isEmpty(param.getIds())){
backstageTaskServiceDao.batchUpAndDownWorkService(param);
}
return ResultBody.success();
}
private List<WorkServiceDTO> getWorkServiceDTOS(List<ServiceDO> pageList) { private List<WorkServiceDTO> getWorkServiceDTOS(List<ServiceDO> pageList) {
// 用户暂时无关联公司数据,先用假数据展示 // 用户暂时无关联公司数据,先用假数据展示
String companyName = "浙江科比特创新科技有限公司"; String companyName = "浙江科比特创新科技有限公司";
...@@ -170,9 +189,6 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -170,9 +189,6 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
for (ServiceDO item : pageList) { for (ServiceDO item : pageList) {
WorkServiceDTO workServiceDTO = WorkServiceDTO.builder().id(item.getId()).serviceName(item.getServiceName()).companyName(companyName) WorkServiceDTO workServiceDTO = WorkServiceDTO.builder().id(item.getId()).serviceName(item.getServiceName()).companyName(companyName)
.coverPlan(item.getCoverPlan()).serviceIntroduction(item.getServiceIntroduction()).video(item.getVideo()).shareCard(item.getShareCard()).build(); .coverPlan(item.getCoverPlan()).serviceIntroduction(item.getServiceIntroduction()).video(item.getVideo()).shareCard(item.getShareCard()).build();
List<InspComtDO> inspComtList = RandomGetInspComt(item.getId());
workServiceDTO.setInspComtList(inspComtList);
workServiceDTO.setInspComtAmount(inspComtList.size());
workServiceDTOList.add(workServiceDTO); workServiceDTOList.add(workServiceDTO);
} }
return workServiceDTOList; return workServiceDTOList;
......
...@@ -718,7 +718,7 @@ public class GoodsInfoServiceImpl implements GoodsInfoService { ...@@ -718,7 +718,7 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
private List<GoodsSpecDTO> getProductSpecInfo( private List<GoodsSpecDTO> getProductSpecInfo(
Integer goodsInfoId, Integer type, Integer leaseTerm) { Integer goodsInfoId, Integer type, Integer leaseTerm) {
// 获取商品对应绑定sku的信息 // 获取商品对应绑定sku的信息
List<MallProdInfoDO> mallProdSkuInfoList = goodsInfoDao.getMallProSkuInfo(goodsInfoId); List<MallProdInfoDO> mallProdSkuInfoList = goodsInfoDao.getAllMallProSkuInfo(goodsInfoId);
List<GoodsSpecDTO> list = List<GoodsSpecDTO> list =
mallProdSkuInfoList.stream() mallProdSkuInfoList.stream()
.map(MallProdInfoDO::buildGoodsSpecDTO) .map(MallProdInfoDO::buildGoodsSpecDTO)
......
...@@ -186,10 +186,10 @@ public class WebDeviceServiceImpl implements WebDeviceService { ...@@ -186,10 +186,10 @@ public class WebDeviceServiceImpl implements WebDeviceService {
} }
int pageNo = param.getPageNo(); int pageNo = param.getPageNo();
param.buildCurrentPage(); param.buildCurrentPage();
List<GoodsInfo> list = webDeviceDao.listWareInfoPage(param, userIds, param.getType());
List<LeaseGoodsInfoDTO> pageList =
list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList());
if (StringUtils.isBlank(request.getHeader(TokenConstant.TOKEN))) { if (StringUtils.isBlank(request.getHeader(TokenConstant.TOKEN))) {
List<GoodsInfo> list = webDeviceDao.listWareInfoPage(param, userIds, param.getType());
List<LeaseGoodsInfoDTO> pageList =
list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList());
return ResultBody.success(PageResult.buildPage(pageNo, param.getPageSize(), count, pageList)); return ResultBody.success(PageResult.buildPage(pageNo, param.getPageSize(), count, pageList));
} }
...@@ -198,9 +198,6 @@ public class WebDeviceServiceImpl implements WebDeviceService { ...@@ -198,9 +198,6 @@ public class WebDeviceServiceImpl implements WebDeviceService {
if (userAccountSimpleDTO == null) { if (userAccountSimpleDTO == null) {
return ResultBody.error(ResultEnum.INTERNAL_SERVER_ERROR); return ResultBody.error(ResultEnum.INTERNAL_SERVER_ERROR);
} }
List<GoodsInfo> list = webDeviceDao.listWareInfoPage(param, userIds, param.getType());
List<LeaseGoodsInfoDTO> pageList =
list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList());
if (userAccountSimpleDTO.getCooperationTagId() == null) { if (userAccountSimpleDTO.getCooperationTagId() == null) {
return ResultBody.success(PageResult.buildPage(pageNo, param.getPageSize(), count, pageList)); return ResultBody.success(PageResult.buildPage(pageNo, param.getPageSize(), count, pageList));
} }
......
...@@ -172,11 +172,12 @@ ...@@ -172,11 +172,12 @@
select id, `name`, icon,directory_id select id, `name`, icon,directory_id
from categories from categories
<where> <where>
is_deleted = 0 is_deleted = 0 and parent_id = 0
<foreach collection="list" separator="," open="and directory_id in(" close=")" index="index" item="d"> <foreach collection="list" separator="," open="and directory_id in(" close=")" index="index" item="d">
#{d} #{d}
</foreach> </foreach>
</where> </where>
order by sort asc
</select> </select>
<select id="getCategoriesByDirectoryId" resultType="com.mmc.pms.entity.Categories" <select id="getCategoriesByDirectoryId" resultType="com.mmc.pms.entity.Categories"
......
...@@ -136,11 +136,11 @@ ...@@ -136,11 +136,11 @@
</foreach> </foreach>
</update> </update>
<update id="batchUpdateMallProdSpec"> <update id="batchUpdateMallProdSpec">
<foreach collection="list" item="d" separator=";" index="index"> update mall_prod_info_spec
update mall_prod_info_spec set is_deleted = 1
set is_deleted = 1 where is_deleted = 0
where id = #{d} <foreach collection="list" item="d" separator="," index="index" open="and id in (" close=")">
and is_deleted = 0 #{d}
</foreach> </foreach>
</update> </update>
<update id="batchDownWare"> <update id="batchDownWare">
...@@ -226,6 +226,7 @@ ...@@ -226,6 +226,7 @@
INNER JOIN product ps ON ps.id = mi.product_id INNER JOIN product ps ON ps.id = mi.product_id
WHERE mi.goods_info_id = #{id} WHERE mi.goods_info_id = #{id}
AND mi.is_deleted = 0 AND mi.is_deleted = 0
and flag = 0
</select> </select>
<select id="getMallIndustrySkuInfo" resultType="com.mmc.pms.entity.MallIndustrySkuInfoDO"> <select id="getMallIndustrySkuInfo" resultType="com.mmc.pms.entity.MallIndustrySkuInfoDO">
SELECT mi.id, SELECT mi.id,
...@@ -491,6 +492,7 @@ ...@@ -491,6 +492,7 @@
INNER JOIN product_spec ps ON mp.product_spec_id = ps.id INNER JOIN product_spec ps ON mp.product_spec_id = ps.id
WHERE mp.goods_info_id = #{id} WHERE mp.goods_info_id = #{id}
AND mp.is_deleted = 0 AND mp.is_deleted = 0
ORDER BY mp.create_time asc
</select> </select>
<select id="listMallprodSpecById" resultType="com.mmc.pms.entity.MallProdSkuInfoSpecDO"> <select id="listMallprodSpecById" resultType="com.mmc.pms.entity.MallProdSkuInfoSpecDO">
SELECT SELECT
...@@ -574,7 +576,7 @@ ...@@ -574,7 +576,7 @@
</if> </if>
</where> </where>
ORDER BY ORDER BY
gi.shelf_status DESC , gi.create_time DESC gi.shelf_status DESC , gi.create_time asc
limit #{pageNo},#{pageSize} limit #{pageNo},#{pageSize}
</select> </select>
...@@ -596,4 +598,27 @@ ...@@ -596,4 +598,27 @@
OR gi.category_by_two = #{id}) OR gi.category_by_two = #{id})
AND gi.is_deleted = 0 AND gi.is_deleted = 0
</select> </select>
<select id="getAllMallProSkuInfo" resultType="com.mmc.pms.entity.MallProdInfoDO">
SELECT mi.id,
mi.goods_info_id,
mi.product_id prodSkuId,
mi.prod_spec_name prodSkuSpecName,
mi.categories_id categoriesId,
mi.choose_type chooseType,
mi.sku_unit_id skuUnitId,
mi.is_must must,
mi.flag flag,
mi.create_time createTime,
c.name typeName,
su.id skuUnitId,
su.unit_name unitName,
ps.product_name productSkuName
FROM mall_prod_info mi
INNER JOIN categories c ON c.id = mi.categories_id
INNER JOIN sku_unit su ON mi.sku_unit_id = su.id
INNER JOIN product ps ON ps.id = mi.product_id
WHERE mi.goods_info_id = #{id}
AND mi.is_deleted = 0
ORDER BY mi.create_time asc
</select>
</mapper> </mapper>
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<mapper namespace="com.mmc.pms.dao.ProductDao"> <mapper namespace="com.mmc.pms.dao.ProductDao">
<insert id="insertProductSku" parameterType="com.mmc.pms.entity.ProductSkuDO" <insert id="insertProductSku" parameterType="com.mmc.pms.entity.ProductSkuDO"
useGeneratedKeys="true" keyProperty="id"> useGeneratedKeys="true" keyProperty="id">
insert into product (product_name, categories_id, model, brand_info_id, directory_id) insert into product (product_name, categories_id, model, brand_info_id, directory_id, customize)
values (#{productName}, #{categoriesId}, #{model}, #{brandInfoId}, #{directoryId}) values (#{productName}, #{categoriesId}, #{model}, #{brandInfoId}, #{directoryId}, #{customize})
</insert> </insert>
<insert id="insertProductSpec" keyProperty="id" useGeneratedKeys="true" <insert id="insertProductSpec" keyProperty="id" useGeneratedKeys="true"
parameterType="com.mmc.pms.entity.ProductSpecDO"> parameterType="com.mmc.pms.entity.ProductSpecDO">
......
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
</foreach> </foreach>
</if> </if>
</where> </where>
order by gi.create_time DESC order by gi.create_time asc
limit #{param.pageNo},#{param.pageSize} limit #{param.pageNo},#{param.pageSize}
</select> </select>
<select id="getWareInfoById" resultMap="wareInfoResultMap" parameterType="java.lang.Integer"> <select id="getWareInfoById" resultMap="wareInfoResultMap" parameterType="java.lang.Integer">
......
...@@ -153,17 +153,20 @@ ...@@ -153,17 +153,20 @@
</update> </update>
<!--通过主键删除--> <!--通过主键删除-->
<update id="deleteById" parameterType="java.lang.Integer"> <update id="deleteByIds" parameterType="java.lang.Integer">
update service update service
set is_deleted = 1 set is_deleted = 1
where id = #{id} where
<foreach collection="ids" open="id in (" close=")" item="item" separator=",">
#{item}
</foreach>
</update> </update>
<select id="conditionCount" resultType="java.lang.Integer"> <select id="conditionCount" resultType="java.lang.Integer">
select count(*) select count(*)
from service from service
<where> <where>
is_deleted = 0 and display_state = 0 is_deleted = 0
<if test="categoriesIds != null"> <if test="categoriesIds != null">
<foreach collection="categoriesIds" item="item" open="and (application_id in (" close=")" separator=","> <foreach collection="categoriesIds" item="item" open="and (application_id in (" close=")" separator=",">
#{item} #{item}
...@@ -188,6 +191,9 @@ ...@@ -188,6 +191,9 @@
<if test="param.applicationId!=null"> <if test="param.applicationId!=null">
and application_id = #{param.applicationId} and application_id = #{param.applicationId}
</if> </if>
<if test="param.displayState != null">
and display_state = #{param.displayState}
</if>
</where> </where>
</select> </select>
...@@ -197,7 +203,7 @@ ...@@ -197,7 +203,7 @@
service_introduction, create_time, update_time, account_id service_introduction, create_time, update_time, account_id
from service from service
<where> <where>
is_deleted = 0 and display_state = 0 is_deleted = 0
<if test="categoriesIds != null"> <if test="categoriesIds != null">
<foreach collection="categoriesIds" item="item" open="and (application_id in (" close=")" separator=","> <foreach collection="categoriesIds" item="item" open="and (application_id in (" close=")" separator=",">
#{item} #{item}
...@@ -222,6 +228,9 @@ ...@@ -222,6 +228,9 @@
<if test="param.applicationId!=null"> <if test="param.applicationId!=null">
and application_id = #{param.applicationId} and application_id = #{param.applicationId}
</if> </if>
<if test="param.displayState != null">
and display_state = #{param.displayState}
</if>
</where> </where>
order by create_time desc order by create_time desc
limit #{param.pageNo}, #{param.pageSize} limit #{param.pageNo}, #{param.pageSize}
...@@ -248,4 +257,13 @@ ...@@ -248,4 +257,13 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<select id="batchUpAndDownWorkService" resultType="java.lang.Integer">
update service
set display_state = #{param.displayState}
where
<foreach collection="param.ids" open="id in (" close=")" item="item" separator=",">
#{item}
</foreach>
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论