Commit c799f851 authored by 黎聪聪's avatar 黎聪聪

2020年11月12日 13:28:48

parent 48ebf1bd
...@@ -483,8 +483,8 @@ ...@@ -483,8 +483,8 @@
<if test="id !=null"> <if test="id !=null">
AND t.id =#{id} AND t.id =#{id}
</if> </if>
<if test="openid !=null"> <if test="openId !=null">
AND t.openid =#{openid} AND t.openid =#{openId}
</if> </if>
<if test="status!=null "> <if test="status!=null ">
AND t.status =#{status} AND t.status =#{status}
...@@ -541,12 +541,12 @@ FROM t_order WHERE del_flag = 0 ...@@ -541,12 +541,12 @@ FROM t_order WHERE del_flag = 0
LEFT JOIN area b ON s.city_id = b.areaid LEFT JOIN area b ON s.city_id = b.areaid
LEFT JOIN area c ON s.area_id = c.areaid LEFT JOIN area c ON s.area_id = c.areaid
WHERE t.del_flag=0 WHERE t.del_flag=0
<if test="openid !=null and openid!= ''"> <if test="openId !=null and openId!= ''">
AND t.openid =#{openid} AND t.openid =#{openId}
</if> </if>
<if test="searchName!=null and searchName !=''"> <if test="searchName!=null and searchName !=''">
AND CONCAT(t.number, p.product_name) LIKE '%${searchName}%' AND CONCAT(IFNULL(`t.number`,''), IFNULL(`p.product_name`,'')) LIKE '%${searchName}%'
</if> </if>
<if test="status!=null "> <if test="status!=null ">
AND t.status = #{status} AND t.status = #{status}
......
...@@ -9,12 +9,13 @@ import lombok.Data; ...@@ -9,12 +9,13 @@ import lombok.Data;
*/ */
@Data @Data
public class OrderMobileDto { public class OrderMobileDto {
private String openid; private String openId;
private String search; private String search;
private String searchName; private String searchName;
private Long status; private Long status;
private Long page; private Long page;
private Long pageSize; private Long pageSize;
private Long id; private Long id;
private String appId;
} }
...@@ -43,7 +43,7 @@ public interface OrderService extends GenericService<Order> { ...@@ -43,7 +43,7 @@ public interface OrderService extends GenericService<Order> {
* @Param * @Param
* @return * @return
**/ **/
JSONObject orderSize(String openid); JSONObject orderSize(String openId,String appId);
/** /**
* @Author Licc * @Author Licc
......
package com.cftech.order.service.impl; package com.cftech.order.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.cftech.accounts.model.MpAccountsEntity;
import com.cftech.accounts.service.MpAccountsService;
import com.cftech.core.sql.Sort; import com.cftech.core.sql.Sort;
import com.cftech.core.util.StringUtils; import com.cftech.core.util.StringUtils;
import com.cftech.order.model.*; import com.cftech.order.model.*;
...@@ -35,7 +37,8 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -35,7 +37,8 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
@Autowired @Autowired
@Qualifier("orderMapper") @Qualifier("orderMapper")
private OrderMapper orderMapper; private OrderMapper orderMapper;
@Autowired
private MpAccountsService mpAccountsService;
@Override @Override
public GenericDao<Order> getGenericMapper() { public GenericDao<Order> getGenericMapper() {
return orderMapper; return orderMapper;
...@@ -161,16 +164,17 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -161,16 +164,17 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject(); com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject();
com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject(); com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
try { try {
if (StringUtils.isEmpty(orderMobileDto.getOpenid())){ if (StringUtils.isEmpty(orderMobileDto.getOpenId())){
rtnJson.put("errorNo","0"); rtnJson.put("errorNo","1");
rtnJson.put("errorMsg","openid不能为空"); rtnJson.put("errorMsg","openid不能为空");
return rtnJson; return rtnJson;
} }
if (orderMobileDto.getStatus()==null){ if (orderMobileDto.getStatus()==null){
rtnJson.put("errorNo","0"); rtnJson.put("errorNo","1");
rtnJson.put("errorMsg","status不能为空"); rtnJson.put("errorMsg","status不能为空");
return rtnJson; return rtnJson;
} }
MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(orderMobileDto.getAppId());
List<OrderMobile> orderMobiles = orderMapper.orderFall(orderMobileDto); List<OrderMobile> orderMobiles = orderMapper.orderFall(orderMobileDto);
for (OrderMobile orderMobile : orderMobiles) { for (OrderMobile orderMobile : orderMobiles) {
Long mobileId = orderMobile.getId(); Long mobileId = orderMobile.getId();
...@@ -192,15 +196,16 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -192,15 +196,16 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
} }
@Override @Override
public com.alibaba.fastjson.JSONObject orderSize(String openid) { public com.alibaba.fastjson.JSONObject orderSize(String openId,String appId) {
com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject(); com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject();
try{ try{
if (StringUtils.isEmpty(openid)){ if (StringUtils.isEmpty(openId)){
rtnJson.put("errorNo","0"); rtnJson.put("errorNo","0");
rtnJson.put("errorMsg","openid不能为空"); rtnJson.put("errorMsg","openid不能为空");
return rtnJson; return rtnJson;
} }
OrderSizeVO productMobiles = orderMapper.orderSize(openid); MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(appId);
OrderSizeVO productMobiles = orderMapper.orderSize(openId);
if (productMobiles!=null){ if (productMobiles!=null){
rtnJson.put("errorNo","0"); rtnJson.put("errorNo","0");
rtnJson.put("data",productMobiles); rtnJson.put("data",productMobiles);
...@@ -219,7 +224,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -219,7 +224,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject(); com.alibaba.fastjson.JSONObject rtnJson = new com.alibaba.fastjson.JSONObject();
com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject(); com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
try{ try{
if (StringUtils.isEmpty(orderMobileDto.getOpenid())){ if (StringUtils.isEmpty(orderMobileDto.getOpenId())){
rtnJson.put("errorNo","0"); rtnJson.put("errorNo","0");
rtnJson.put("errorMsg","openid不能为空"); rtnJson.put("errorMsg","openid不能为空");
return rtnJson; return rtnJson;
...@@ -229,6 +234,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order ...@@ -229,6 +234,7 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
rtnJson.put("errorMsg","订单状态不能为空"); rtnJson.put("errorMsg","订单状态不能为空");
return rtnJson; return rtnJson;
} }
MpAccountsEntity mpAccountsAppid = mpAccountsService.getMpAccountsAppid(orderMobileDto.getAppId());
List<OrderMobile> orderMobiles = orderMapper.orderList(orderMobileDto); List<OrderMobile> orderMobiles = orderMapper.orderList(orderMobileDto);
for (OrderMobile orderMobile : orderMobiles) { for (OrderMobile orderMobile : orderMobiles) {
Long mobileId = orderMobile.getId(); Long mobileId = orderMobile.getId();
......
...@@ -42,8 +42,8 @@ public class MobileOrderController { ...@@ -42,8 +42,8 @@ public class MobileOrderController {
* @Param * @Param
**/ **/
@RequestMapping(value = "/orderSize", method = {RequestMethod.POST}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/orderSize", method = {RequestMethod.POST}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject orderSize(String openid) { public JSONObject orderSize(String openId,String appId) {
return orderService.orderSize(openid); return orderService.orderSize(openId,appId);
} }
/** /**
......
...@@ -49,8 +49,7 @@ public class MobileclassifyController { ...@@ -49,8 +49,7 @@ public class MobileclassifyController {
* @return com.alibaba.fastjson.JSONObject * @return com.alibaba.fastjson.JSONObject
**/ **/
@RequestMapping(value = "/productDosage",method = {RequestMethod.GET,RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/productDosage",method = {RequestMethod.GET,RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject productDosage(@RequestParam String appId, public JSONObject productDosage(String appId,String dosageName){
@RequestParam(required = false) String dosageName){
return ProductclassifyService.productDosage(appId,dosageName); return ProductclassifyService.productDosage(appId,dosageName);
} }
/** /**
......
...@@ -30,7 +30,7 @@ public class MobileProductController { ...@@ -30,7 +30,7 @@ public class MobileProductController {
* @return * @return
**/ **/
@RequestMapping(value = "/productId",method = {RequestMethod.GET, RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/productId",method = {RequestMethod.GET, RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject productMenu(@RequestParam(required = true) Long id, @RequestParam(required = true) String appId){ public JSONObject productMenu(Long id,String appId){
return productService.productId(id,appId); return productService.productId(id,appId);
} }
......
...@@ -472,7 +472,7 @@ WHERE del_flag=0 ...@@ -472,7 +472,7 @@ WHERE del_flag=0
AND `column`= #{id} AND `column`= #{id}
</if> </if>
<if test="title!=null and title!=''"> <if test="title!=null and title!=''">
AND CONCAT(title,author) LIKE '%${title}%' AND CONCAT(IFNULL(`title`,''),IFNULL(`author`,'')) LIKE '%${title}%'
</if> </if>
ORDER BY ORDER BY
create_time create_time
......
...@@ -169,7 +169,7 @@ public class MobileCfArticleController { ...@@ -169,7 +169,7 @@ public class MobileCfArticleController {
} }
/** /**
* @Author Licc * @Author Licc
* @Description 栏目文章详情 栏目文章搜索 * @Description 栏目文章列表 栏目文章搜索
* @Date 10:34 2020/10/30 * @Date 10:34 2020/10/30
* @Param * @Param
* @return * @return
......
...@@ -65,5 +65,5 @@ public interface MemberService extends GenericService<Member> { ...@@ -65,5 +65,5 @@ public interface MemberService extends GenericService<Member> {
* @Param * @Param
* @return * @return
**/ **/
JSONObject fanssChat(String openid); JSONObject fanssChat(String openid,String appId);
} }
...@@ -151,7 +151,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem ...@@ -151,7 +151,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
} }
@Override @Override
public JSONObject fanssChat(String openid) { public JSONObject fanssChat(String openid,String appId) {
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
try { try {
if (StringUtils.isEmpty(openid)){ if (StringUtils.isEmpty(openid)){
...@@ -159,6 +159,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem ...@@ -159,6 +159,7 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
rtnJson.put("data","openid不能为空"); rtnJson.put("data","openid不能为空");
return rtnJson; return rtnJson;
} }
MpAccountsEntity accountsAppid = mpAccountsService.getMpAccountsAppid(appId);
FanssVO fanssVO = memberMapper.fanssChat(openid); FanssVO fanssVO = memberMapper.fanssChat(openid);
if (fanssVO!=null){ if (fanssVO!=null){
rtnJson.put("errorNo","0"); rtnJson.put("errorNo","0");
......
...@@ -53,7 +53,7 @@ public class MobileMemberController { ...@@ -53,7 +53,7 @@ public class MobileMemberController {
* @return * @return
**/ **/
@RequestMapping(value = "/fanssChat", method = {RequestMethod.POST}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/fanssChat", method = {RequestMethod.POST}, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject fanssChat(String openid){ public JSONObject fanssChat(String openid,String appId){
return memberService.fanssChat(openid); return memberService.fanssChat(openid);
} }
} }
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