Commit 9109d351 authored by luben's avatar luben

fix

parent 8dc2aa70
...@@ -16,6 +16,7 @@ import com.ruoyi.system.domain.grid.ext.GridCompanyExt; ...@@ -16,6 +16,7 @@ import com.ruoyi.system.domain.grid.ext.GridCompanyExt;
import com.ruoyi.system.domain.grid.ext.GridCompanyPeopleExt; import com.ruoyi.system.domain.grid.ext.GridCompanyPeopleExt;
import com.ruoyi.system.domain.grid.vo.GridCompanySearchParam; import com.ruoyi.system.domain.grid.vo.GridCompanySearchParam;
import com.ruoyi.system.domain.other.BsCommon; import com.ruoyi.system.domain.other.BsCommon;
import com.ruoyi.system.mapper.grid.GridCompanyMapper;
import com.ruoyi.system.service.grid.GridCompanyPeopleService; import com.ruoyi.system.service.grid.GridCompanyPeopleService;
import com.ruoyi.system.service.grid.GridCompanyService; import com.ruoyi.system.service.grid.GridCompanyService;
import com.ruoyi.system.service.grid.GridRegionService; import com.ruoyi.system.service.grid.GridRegionService;
...@@ -49,6 +50,8 @@ public class CompanyController extends BaseController { ...@@ -49,6 +50,8 @@ public class CompanyController extends BaseController {
private BsCommonService bsCommonService; private BsCommonService bsCommonService;
@Autowired @Autowired
private GridRegionService gridRegionService; private GridRegionService gridRegionService;
@Autowired
private GridCompanyMapper gridCompanyMapper;
@RequestMapping(value = "/page", method = RequestMethod.GET) @RequestMapping(value = "/page", method = RequestMethod.GET)
public AjaxResult page(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum, public AjaxResult page(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
...@@ -214,4 +217,14 @@ public class CompanyController extends BaseController { ...@@ -214,4 +217,14 @@ public class CompanyController extends BaseController {
return AjaxResult.success(gridCompanyService.getAllCompanyList(param)); return AjaxResult.success(gridCompanyService.getAllCompanyList(param));
} }
@GetMapping("/saveLabel")
public AjaxResult saveLabel(@RequestParam(value = "id")String id,@RequestParam(value = "label")String label){
return AjaxResult.success(gridCompanyMapper.insertLabelById(id,label));
}
@GetMapping("/selectLabel")
public AjaxResult selectLabel(@RequestParam(value = "id")String id){
return AjaxResult.success(gridCompanyMapper.selectLabelById(id));
}
} }
...@@ -5,6 +5,7 @@ import com.ruoyi.common.utils.StringUtils; ...@@ -5,6 +5,7 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.grid.GridShop; import com.ruoyi.system.domain.grid.GridShop;
import com.ruoyi.system.domain.grid.GridShopStaff; import com.ruoyi.system.domain.grid.GridShopStaff;
import com.ruoyi.system.domain.grid.vo.GridShopSearchParam; import com.ruoyi.system.domain.grid.vo.GridShopSearchParam;
import com.ruoyi.system.mapper.grid.GridShopMapper;
import com.ruoyi.system.service.grid.GridShopService; import com.ruoyi.system.service.grid.GridShopService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -23,6 +24,8 @@ public class ShopController { ...@@ -23,6 +24,8 @@ public class ShopController {
@Autowired @Autowired
GridShopService gridShopService; GridShopService gridShopService;
@Autowired
GridShopMapper gridShopMapper;
/** /**
* 保存 * 保存
...@@ -127,4 +130,14 @@ public class ShopController { ...@@ -127,4 +130,14 @@ public class ShopController {
} }
return AjaxResult.success(gridShopService.getAllShopList(param)); return AjaxResult.success(gridShopService.getAllShopList(param));
} }
@GetMapping("/saveLabel")
public AjaxResult saveLabel(@RequestParam(value = "id")String id,@RequestParam(value = "label")String label){
return AjaxResult.success(gridShopMapper.insertLabelById(id,label));
}
@GetMapping("/selectLabel")
public AjaxResult selectLabel(@RequestParam(value = "id")String id){
return AjaxResult.success(gridShopMapper.selectLabelById(id));
}
} }
...@@ -47,4 +47,8 @@ public interface GridCompanyMapper { ...@@ -47,4 +47,8 @@ public interface GridCompanyMapper {
* @return * @return
*/ */
List<SimpleGridCompanyItem> simplePointList(@Param("wgCode") String wgCode, @Param("name")String name); List<SimpleGridCompanyItem> simplePointList(@Param("wgCode") String wgCode, @Param("name")String name);
int insertLabelById(@Param("id") String id, @Param("label") String label);
String selectLabelById(@Param("id") String id);
} }
...@@ -41,4 +41,8 @@ public interface GridShopMapper { ...@@ -41,4 +41,8 @@ public interface GridShopMapper {
List<GridShop> listByParam(GridShopSearchParam param); List<GridShop> listByParam(GridShopSearchParam param);
List<SimpleGridShopItem> listShopPoint(@Param("wgCode") String wgCode, @Param("name")String name); List<SimpleGridShopItem> listShopPoint(@Param("wgCode") String wgCode, @Param("name")String name);
int insertLabelById(@Param("id") String id, @Param("label") String label);
String selectLabelById(@Param("id") String id);
} }
...@@ -273,6 +273,7 @@ ...@@ -273,6 +273,7 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ruoyi.system.domain.grid.GridCompanyExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ruoyi.system.domain.grid.GridCompanyExample" resultType="java.lang.Long">
select count(*) from grid_company select count(*) from grid_company
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -550,4 +551,14 @@ ...@@ -550,4 +551,14 @@
and wg_code like CONCAT(#{wgCode}, '%') and wg_code like CONCAT(#{wgCode}, '%')
</if> </if>
</select> </select>
<select id="selectLabelById" resultType="java.lang.String">
select label from grid_company
where id = #{id}
</select>
<insert id="insertLabelById">
insert into grid_company
(label) values (#{label,jdbcType=VARCHAR})
where id = #{id}
</insert>
</mapper> </mapper>
...@@ -470,4 +470,14 @@ ...@@ -470,4 +470,14 @@
</if> </if>
</select> </select>
<select id="selectLabelById" resultType="java.lang.String">
select label from grid_shop
where id = #{id}
</select>
<insert id="insertLabelById">
insert into grid_shop
(label) values (#{label,jdbcType=VARCHAR})
where id = #{id}
</insert>
</mapper> </mapper>
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