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

2020年11月12日 13:28:48

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